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.
This commit is contained in:
Neal Norwitz 2006-02-27 21:08:23 +00:00
parent be66e943c2
commit 9aaad88393
1 changed files with 3 additions and 3 deletions

View 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