Even though we don't currently use unicode or complex numbers in the test,
authorNeal Norwitz <nnorwitz@gmail.com>
Mon, 27 Feb 2006 21:08:23 +0000 (21:08 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Mon, 27 Feb 2006 21:08:23 +0000 (21:08 +0000)
be complete when when checking types.

Yield cannot be tested outside a function, so add a comment to that effect.

Lib/test/test_ast.py

index 42aa4c4339ca1507c3eacec53fe065cc47afc9d2..331e96e256eb7de1817a3930f81c9f4b5c0427b8 100644 (file)
@@ -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