
2 May
2016
2 May
'16
4:30 p.m.
On Tue, May 3, 2016 at 8:19 AM, MRAB python@mrabarnett.plus.com wrote:
You _don't_ have to know attributes are available. It's as simple(?) as: when it sees the leading-dot notation, it checks how many expressions the enclosing 'with' was followed by.
For example:
with something: .foo()
is OK (the 'with' has 1 expression), but:
with first_thing, second_else: .foo()
might not be OK (the 'with' has 2 expressions).
Replace "might" with "will" and I'd agree with you. Keep it simple: no ambiguity.
ChrisA