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.