[Python-ideas] with-statement syntactic quirk

Guido van Rossum guido at python.org
Wed Oct 31 16:42:28 CET 2012

On Wed, Oct 31, 2012 at 8:28 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> On Thu, Nov 1, 2012 at 1:13 AM, Guido van Rossum <guido at python.org> wrote:
>> Honestly, is a backslash going to kill you?
> Aye, given the cost-benefit ratio on this one, I'll be rather
> surprised if anyone ever actually fixes it. I just wanted to be clear
> that I'm not *philosophically* opposed to fixing it (since I think
> Barry's proposed behaviour makes more sense from a user perspective),
> I'm just fairly sure it's likely to be hard to fix without making the
> Grammar harder to maintain, which *would* be a difficult sell for
> something that's a relatively trivial wart :)

Yeah, the problem is that when you see a '(' immediately after 'with',
you don't know whether that's just the start of a parenthesized
expression or the start of a (foo as bar, blah as blabla) syntactic

--Guido van Rossum (python.org/~guido)

More information about the Python-ideas mailing list