summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-01-07 05:50:35 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-01-07 05:50:35 (GMT)
commit1db6f80cd5259841f1387f14bf773ebc3c946502 (patch)
tree51826f85df81b05c7fbf226672291be960db226b /Lib
parentb8e0072fec28e6c1a8398b12b5b40f82e878f8b9 (diff)
downloadcpython-1db6f80cd5259841f1387f14bf773ebc3c946502.zip
cpython-1db6f80cd5259841f1387f14bf773ebc3c946502.tar.gz
cpython-1db6f80cd5259841f1387f14bf773ebc3c946502.tar.bz2
Cleanup subclassing example to more clearly show fixed-width print format.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/collections.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/collections.py b/Lib/collections.py
index 1701952..d3f7b80 100644
--- a/Lib/collections.py
+++ b/Lib/collections.py
@@ -123,8 +123,7 @@ if __name__ == '__main__':
def __repr__(self):
return 'Point(x=%.3f, y=%.3f, hypot=%.3f)' % (self.x, self.y, self.hypot)
- print Point(3, 4)
- print Point(2, 5)
+ print Point(3, 4),'\n', Point(2, 5), '\n', Point(9./7, 6)
import doctest
TestResults = namedtuple('TestResults', 'failed attempted')