31 Oct
2012
31 Oct
'12
9:51 a.m.
On Oct 31, 2012, at 09:55 PM, Nick Coghlan wrote:
It's not an especially subtle corner of the grammar, it's tuples-as-context-managers (i.e. the case with no as clauses) that causes hassles:
with (cmA, cmB): pass
This is: a) useless (because tuples aren't context managers); but also b) legal syntax (it blows up at runtime, complaining about a missing __enter__ or __exit__ method rather than throwing SyntaxError at compile time)
So clearly we need to make tuples proper context managers <wink>. -Barry