[Python-ideas] Object grabbing

Chris Angelico rosuav at gmail.com
Mon May 2 19:30:01 EDT 2016

On Tue, May 3, 2016 at 8:19 AM, MRAB <python at 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


More information about the Python-ideas mailing list