Skip to content

Commit 5fa3f26

Browse files
committed
Testing Composite
1 parent 743ff70 commit 5fa3f26

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

app/coordinates.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
"""app.coordinates.py"""
22

3-
4-
class Coordinates:
5-
"""
6-
A position on earth using decimal coordinates (latitude and longitude).
7-
"""
8-
3+
class Position(object):
94
def __init__(self, latitude, longitude):
105
self.latitude = latitude
116
self.longitude = longitude
127

13-
def serialize(self):
8+
class Coordinates(Position):
9+
"""
10+
A position on earth using decimal coordinates (latitude and longitude).
11+
"""
12+
def serialize(self, position):
13+
self.position = {"latitude": self.latitude, "longitude": self.longitude}
1414
"""
1515
Serializes the coordinates into a dict.
1616
1717
:returns: The serialized coordinates.
1818
:rtype: dict
1919
"""
20-
return {"latitude": self.latitude, "longitude": self.longitude}
20+
return self.postion
2121

2222
def __str__(self):
2323
return "lat: %s, long: %s" % (self.latitude, self.longitude)

0 commit comments

Comments
 (0)