[Python-ideas] Object grabbing
Erik
python at lucidity.plus.com
Mon May 2 16:25:01 EDT 2016
On 02/05/16 14:57, Koos Zevenhoven wrote:
> On Mon, May 2, 2016 at 3:44 PM, Alexander Walters
> <tritium-list at sdamon.com> wrote:
>> with open(foo), open(bar):
>> .write(baz) # does what?
>>
>
> Hopefully it would raise an exception,
Then you are suggesting that an attribute is looked up at runtime on
_all_ objects declared in all live 'with' scopes every time one is
referenced in order to determine if it's an ambiguous reference (at the
time of that reference).
O(n). I'm pretty sure that will never happen.
E.
More information about the Python-ideas
mailing list