We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a96a192 commit 0d47beaCopy full SHA for 0d47bea
1 file changed
Lib/test/test_genexps.py
@@ -131,6 +131,14 @@
131
>>> list(g)
132
[1, 9, 25, 49, 81]
133
134
+Verify that the outermost for-expression makes an immediate check
135
+for iterability
136
+ >>> (i for i in 6)
137
+ Traceback (most recent call last):
138
+ File "<pyshell#4>", line 1, in -toplevel-
139
+ (i for i in 6)
140
+ TypeError: 'int' object is not iterable
141
+
142
Verify late binding for the innermost for-expression
143
144
>>> g = ((i,j) for i in range(3) for j in range(x))
0 commit comments