From 9aaad88393969c3b61609ad93331a743c1dafda7 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Mon, 27 Feb 2006 21:08:23 +0000 Subject: 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. --- Lib/test/test_ast.py | 6 +++--- 1 file 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 -- cgit v0.12