Terry J. Reedy <tjre...@udel.edu> added the comment:

I verified with 3.1 the two OP cases and that generators work fine as long as 
they supply the correct number of values.

def f(x): return x
def broken(): return 1
print(f(*(broken() for x in (0,))))
# prints 1

Change (0,) to (0,1) the normal arg num mismatch message appears.

test_extcall tests version of Nothing() that follow both the old and new 
iteration protocol. It is possible that 'sequence' in meant in the broader 
sense of finite iterable rather that the narrow sense of
5.6. Sequence Types — str, bytes, bytearray, list, tuple, range

Since that is confusing, I would replace 'sequence' with 'finite iterable'. 
(Infinite iterables, obviously, are bad, just as in any other uncontrolled 
situation, such as "a,*b = itertools.count()".)

So, combine the correction and the suggestion above with original and diff 
against current trunk (py3k branch) if you can or at least 3.1.2.

----------
nosy: +terry.reedy
versions: +Python 3.2 -Python 2.5, Python 2.6, Python 3.0

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4806>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to