[Python-ideas] Generator unpacking
Stephen J. Turnbull
stephen at xemacs.org
Mon Feb 15 22:42:11 EST 2016
Andrew Barnert via Python-ideas writes:
> But that isn't a problem; we're not trying to come up with a
> definition that could be used to write type-theoretic behavior
> proofs for Python semantics, but something that's useful in
> practice for discussing almost all real Python programs with other
> humans.
Are there really places where we *want* "foo(range(n))" to raise but
"foo(iter(range(n)))" to do something useful? In other words, is this
really a terminology problem, rather than a problem with the design of
APIs that take iterators rather than iterables?
More information about the Python-ideas
mailing list