summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/collections.rst2
-rw-r--r--Doc/library/reprlib.rst2
2 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 7dd8848..8bcc2ac 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -632,7 +632,7 @@ a fixed-width print format:
... def __str__(self):
... return 'Point: x=%6.3f y=%6.3f hypot=%6.3f' % (self.x, self.y, self.hypot)
- >>> for p in Point(3, 4), Point(14, 5/7.):
+ >>> for p in Point(3, 4), Point(14, 5/7):
... print(p)
Point: x= 3.000 y= 4.000 hypot= 5.000
Point: x=14.000 y= 0.714 hypot=14.018
diff --git a/Doc/library/reprlib.rst b/Doc/library/reprlib.rst
index e503442..aad6f66 100644
--- a/Doc/library/reprlib.rst
+++ b/Doc/library/reprlib.rst
@@ -126,7 +126,7 @@ for file objects could be added::
if obj.name in ['<stdin>', '<stdout>', '<stderr>']:
return obj.name
else:
- return `obj`
+ return repr(obj)
aRepr = MyRepr()
print aRepr.repr(sys.stdin) # prints '<stdin>'