ch05: new chapter
This commit is contained in:
1 parent
b74ea52ffb
commit
1df34f2945
25 files changed
+640
No files matched your search
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
``Coordinate``: a simple class with a custom ``__str__``::
|
||||
|
||||
>>> moscow = Coordinate(55.756, 37.617)
|
||||
>>> print(moscow) # doctest:+ELLIPSIS
|
||||
<coordinates.Coordinate object at 0x...>
|
||||
"""
|
||||
|
||||
# tag::COORDINATE[]
|
||||
class Coordinate:
|
||||
|
||||
def __init__(self, lat, long):
|
||||
self.lat = lat
|
||||
self.long = long
|
||||
|
||||
# end::COORDINATE[]
|
||||
Reference in new issue
Block a user