[Python-ideas] Object grabbing

Greg Ewing greg.ewing at canterbury.ac.nz
Mon May 2 19:32:33 EDT 2016

Joshua Morton wrote:
> would something like replacing all attribute access with a 
>     try:
>         x
>     except NameError:
>         namespace.x  # or something like this
> work, or are you saying that since 'namespace' wouldn't be in slots 
> either, this would fail?

I meant that Namespace can't be an ordinary Python object
that works without cooperation from the compiler. If the
compiler is allowed to recognise the use of Namespace
and generate different code, anything is possible.


More information about the Python-ideas mailing list