From 7c90519cbf42bda731cee82a793d666ae4bc2d2b Mon Sep 17 00:00:00 2001 From: Brian Spiering Date: Sat, 29 Apr 2017 13:22:56 -0400 Subject: [PATCH] Update documentation for Python 3 --- README.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index efaca8e..dd14514 100644 --- a/README.rst +++ b/README.rst @@ -8,18 +8,18 @@ encoding Geohashes_ to and from latitude and longitude coordinates. Example:: >>> import Geohash - >>> print 'Geohash for 42.6, -5.6:', Geohash.encode(42.6, -5.6) + >>> print('Geohash for 42.6, -5.6:', Geohash.encode(42.6, -5.6)) Geohash for 42.6, -5.6: ezs42e44yx96 You can specify an arbitrary precision when encoding. The precision determines the number of characters in the Geohash:: - >>> print 'Geohash for 42.6, -5.6:', Geohash.encode(42.6, -5.6, precision=5) + >>> print('Geohash for 42.6, -5.6:', Geohash.encode(42.6, -5.6, precision=5)) Geohash for 42.6, -5.6: ezs42 Decoding a Geohash returns a (latitude, longitude) tuple:: - >>> print 'Coordinate for Geohash ezs42:', Geohash.decode('ezs42') + >>> print('Coordinate for Geohash ezs42:', Geohash.decode('ezs42')) Coordinate for Geohash ezs42: ('42.6', '-5.6') The Geohash module also provides exact decoding with error margin @@ -27,7 +27,7 @@ results. The decode_exactly function returns a tuple of four float values; latitude, longitude, latitude error margin, longitude error margin:: - >>> print 'Exact coordinate for Geohash ezs42:\n', Geohash.decode_exactly('ezs42') + >>> print('Exact coordinate for Geohash ezs42:\n', Geohash.decode_exactly('ezs42')) Exact coordinate for Geohash ezs42: (42.60498046875, -5.60302734375, 0.02197265625, 0.02197265625)