This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients amaury.forgeotdarc, dangyogi, hagen, kcarnold, terry.reedy
Date 2010-08-04.21:08:09
SpamBayes Score 6.502084e-09
Marked as misclassified No
Message-id <1280956091.22.0.919604071806.issue4806@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-08-04 21:08:11terry.reedysetrecipients: + terry.reedy, amaury.forgeotdarc, dangyogi, hagen, kcarnold
2010-08-04 21:08:11terry.reedysetmessageid: <1280956091.22.0.919604071806.issue4806@psf.upfronthosting.co.za>
2010-08-04 21:08:09terry.reedylinkissue4806 messages
2010-08-04 21:08:09terry.reedycreate