Commit 9aaad883 authored by Neal Norwitz's avatar Neal Norwitz

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.
parent be66e943
import sys, itertools import sys, itertools
def to_tuple(t): 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 return t
elif isinstance(t, list): elif isinstance(t, list):
return [to_tuple(e) for e in t] return [to_tuple(e) for e in t]
...@@ -85,8 +85,8 @@ eval_tests = [ ...@@ -85,8 +85,8 @@ eval_tests = [
"[a for b in c if d]", "[a for b in c if d]",
# GeneratorExp # GeneratorExp
"(a for b in c if d)", "(a for b in c if d)",
# Yield # Yield - yield expressions can't work outside a function
#"def f():yield 3", #
# Compare # Compare
"1 < 2 < 3", "1 < 2 < 3",
# Call # Call
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment