So this is a proposal for a new soft language keyword:
- any name bound within the namespace block is bound in exactly the same way it would be bound if the namespace block were not there, except that the namespace's name and a dot are prepended to the key when being inserted into the module/class/locals dict.
Sometimes it’s useful to write classes that are similar to:
def __getattr__(self, name):
return wrap(getattr(self.object, name))
How would this pattern interact with objects that use namespaces? I’m guessing the interpreter wouldn’t know to call getattr with ‘ns.attr’ rather than just ‘ns’?