On Thu, Nov 10, 2011 at 10:35 AM, Greg Ewing <greg.ew...@canterbury.ac.nz> wrote: > On 10/11/11 11:43, Tim Delaney wrote: >> >> We have precedent for being more restrictive initially, and relaxing those >> restrictions later. >> >> I suggest that the more restrictive implementation go in now so that >> people >> can start playing with it. If the discussion comes to a consensus on more >> relaxed syntax, that can be added later (either in 3.3 or a later >> release). > > That's fair enough. I'll shut up now.
No worries - given the dance you had to go through in the Grammar file to make it work in the first place, I should have realised you'd done it deliberately. (The mention of the 'yield_from' node in the doc patch I was reviewing is actually what got me looking into this). As I said earlier, I'd actually be amenable to making it legal to omit the extra parentheses for both yield & yield from in the single argument case where there's no ambiguity (following the generator expression precedent), but that's a tricky change given the parser limitations. The way your patch tried to do it also allowed "f(yield from x, 1)" which strikes me as being far too confusing to a human reader, even if the parser understands it. Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com