ch05: new chapter

This commit is contained in:
Luciano Ramalho
2020-02-19 00:11:45 -03:00
parent b74ea52ffb
commit 1df34f2945
25 changed files with 640 additions and 0 deletions

View File

@@ -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[]