Skip to content

Commit 225bcd0

Browse files
committed
Coordinates.py aggregation?
1 parent a0dffbd commit 225bcd0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

app/coordinates.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,21 @@ def __init__(self, latitude, longitude):
1010
self.latitude = latitude
1111
self.longitude = longitude
1212

13-
def serialize(self):
13+
class Serialize:
14+
def serialize(self,latitude,longitude):
1415
"""
1516
Serializes the coordinates into a dict.
1617
1718
:returns: The serialized coordinates.
1819
:rtype: dict
1920
"""
20-
return {"latitude": self.latitude, "longitude": self.longitude}
21+
self.latitude=latitude
22+
self.longitude=longitude
23+
24+
return {self.latitude,self.longitude}
2125

2226
def __str__(self):
2327
return "lat: %s, long: %s" % (self.latitude, self.longitude)
28+
29+
latitude = Coordinates("latitude")
30+
longitude= Coordinates("longitude")

0 commit comments

Comments
 (0)