summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorStéphane Wirtel <stephane@wirtel.be>2018-02-01 07:31:07 (GMT)
committerXiang Zhang <angwerzx@126.com>2018-02-01 07:31:07 (GMT)
commitab328756d7fd969ee4882458b07892dff135013c (patch)
tree8232995e496e60d338bc8eff66ebbfa67c09b3bc /Doc
parent07a1892f825aa8e2853f28acdff3acf522f86322 (diff)
downloadcpython-ab328756d7fd969ee4882458b07892dff135013c.zip
cpython-ab328756d7fd969ee4882458b07892dff135013c.tar.gz
cpython-ab328756d7fd969ee4882458b07892dff135013c.tar.bz2
bpo-32722: Remove useless example in the Classes tutorial (#5446)
In the tutorial about the Generator expression, there is an example with a dict comprehension and not with a generator expression, just removed the code.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/tutorial/classes.rst5
1 files changed, 1 insertions, 4 deletions
diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst
index 4676ef4..b8f1226 100644
--- a/Doc/tutorial/classes.rst
+++ b/Doc/tutorial/classes.rst
@@ -892,10 +892,7 @@ Examples::
>>> sum(x*y for x,y in zip(xvec, yvec)) # dot product
260
- >>> from math import pi, sin
- >>> sine_table = {x: sin(x*pi/180) for x in range(0, 91)}
-
- >>> unique_words = set(word for line in page for word in line.split())
+ >>> unique_words = set(word for line in page for word in line.split())
>>> valedictorian = max((student.gpa, student.name) for student in graduates)