summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ast.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-02-27 21:08:23 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-02-27 21:08:23 (GMT)
commit9aaad88393969c3b61609ad93331a743c1dafda7 (patch)
tree8638a5cf4a03d9c4c31bcd6b596df650789b78cf /Lib/test/test_ast.py
parentbe66e943c2efb9c83cd139ae036d721a6ce592b0 (diff)
downloadcpython-9aaad88393969c3b61609ad93331a743c1dafda7.zip
cpython-9aaad88393969c3b61609ad93331a743c1dafda7.tar.gz
cpython-9aaad88393969c3b61609ad93331a743c1dafda7.tar.bz2
Even though we don't currently use unicode or complex numbers in the test,
be complete when when checking types. Yield cannot be tested outside a function, so add a comment to that effect.
Diffstat (limited to 'Lib/test/test_ast.py')
-rw-r--r--Lib/test/test_ast.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py
index 42aa4c4..331e96e 100644
--- a/Lib/test/test_ast.py
+++ b/Lib/test/test_ast.py
@@ -1,7 +1,7 @@
import sys, itertools
def to_tuple(t):
- if t is None or isinstance(t, (str, int, long)):
+ if t is None or isinstance(t, (basestring, int, long, complex)):
return t
elif isinstance(t, list):
return [to_tuple(e) for e in t]
@@ -85,8 +85,8 @@ eval_tests = [
"[a for b in c if d]",
# GeneratorExp
"(a for b in c if d)",
- # Yield
- #"def f():yield 3",
+ # Yield - yield expressions can't work outside a function
+ #
# Compare
"1 < 2 < 3",
# Call