[issue25070] Python 2.6 - Python 3.4 allows unparenthesized generator with *args, **kw, forbidden in 3.5

2015-09-11 Thread Antti Haapala
New submission from Antti Haapala: User DeTeReR asked a question (http://stackoverflow.com/questions/32521140/generator-as-function-argument) on Stack Overflow about a special case of code that seemed to work in Python 3.4: f(1 for x in [1], *[2]) and f(*[2], 1 for x in [1]) I found

[issue25070] Python 2.6 - Python 3.4 allows unparenthesized generator with *args, **kw, forbidden in 3.5

2015-09-11 Thread STINNER Victor
STINNER Victor added the comment: I guess that it's a consequence of the PEP 448 "additional unpacking generalizations". -- nosy: +haypo, yselivanov ___ Python tracker ___ _

[issue25070] Python 2.6 - Python 3.4 allows unparenthesized generator with *args, **kw, forbidden in 3.5

2015-09-11 Thread Antti Haapala
Antti Haapala added the comment: @haypo yes. I must add that I found out that Python 2.5 also allows f(1 for x in [1], *a) and f(1 for x in [1], **kw) but not f(*a, 1 for x in [1]) So I do not know if the first and second cases were intentional or not. Also, in Python 2.6 - 3

[issue25070] Python 2.6 - Python 3.4 allows unparenthesized generator with *args, **kw, forbidden in 3.5

2015-09-11 Thread Stefan Krah
Stefan Krah added the comment: According to the human readable grammar in the docs https://docs.python.org/3/reference/expressions.html#calls I'd say this was a bug that is now fixed in 3.5. The call should either take a single unparenthesized generator expression or an argument_list (which

[issue25070] Python 2.6 - Python 3.4 allows unparenthesized generator with *args, **kw, forbidden in 3.5

2015-09-11 Thread Antti Haapala
Antti Haapala added the comment: Yeah, it is a bug in 2.5 too; https://docs.python.org/2.5/ref/calls.html call ::= primary "(" [argument_list [","] | expression genexpr_for] ")" -- assignee: -> docs@python components: +Documentation nosy: +docs@python

[issue25070] Python 2.6 - Python 3.4 allows unparenthesized generator with *args, **kw, forbidden in 3.5

2015-09-11 Thread R. David Murray
R. David Murray added the comment: If we have decided that this is a "fixed bug", it should indeed be mentioned in what's new for 3.5 since it is a behavior change. -- nosy: +r.david.murray ___ Python tracker

[issue25070] Python 2.6 - Python 3.4 allows unparenthesized generator with *args, **kw, forbidden in 3.5

2015-09-11 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: -Python 3.2, Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue25070] Python 2.6 - Python 3.4 allows unparenthesized generator with *args, **kw, forbidden in 3.5

2015-09-11 Thread Yury Selivanov
Yury Selivanov added the comment: > If we have decided that this is a "fixed bug", [..] I'd call this a bug fix. The old syntax was completely unreadable. Should I close this issue? > [..] it should indeed be mentioned in what's new for 3.5 since it is a > behavior change. Sure, I'll docu

[issue25070] Python 2.6 - Python 3.4 allows unparenthesized generator with *args, **kw, forbidden in 3.5

2015-09-12 Thread Stefan Krah
Stefan Krah added the comment: I think the issue can be closed (after updating "what's new"). Even if we wanted to keep backwards compatibility, it's too late now. -- ___ Python tracker ___

[issue25070] Python 2.6 - Python 3.4 allows unparenthesized generator with *args, **kw, forbidden in 3.5

2015-09-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 10a9d4acd9cb by Yury Selivanov in branch '3.5': whatsnew/3.5 More edits https://hg.python.org/cpython/rev/10a9d4acd9cb -- nosy: +python-dev ___ Python tracker

[issue25070] Python 2.6 - Python 3.4 allows unparenthesized generator with *args, **kw, forbidden in 3.5

2015-09-12 Thread Yury Selivanov
Yury Selivanov added the comment: What's new is now updated with description of this issue. Closing it now. -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___