File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 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 )
You can’t perform that action at this time.
0 commit comments