[Python-checkins] r42620 - python/trunk/Lib/test/test_ast.py
neal.norwitz
python-checkins at python.org
Mon Feb 27 22:08:27 CET 2006
Author: neal.norwitz
Date: Mon Feb 27 22:08:23 2006
New Revision: 42620
Modified:
python/trunk/Lib/test/test_ast.py
Log:
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.
Modified: python/trunk/Lib/test/test_ast.py
==============================================================================
--- python/trunk/Lib/test/test_ast.py (original)
+++ python/trunk/Lib/test/test_ast.py Mon Feb 27 22:08:23 2006
@@ -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 @@
"[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
More information about the Python-checkins
mailing list