[Python-Dev] Add __exports__ to modules
Fri, 5 Jan 2001 15:20:58 -0800
On Sat, Jan 06, 2001 at 12:15:20AM -0500, Barry A. Warsaw wrote:
> I might be more positive on the addition if __exports__ were added to
> classes, because at least there'd be a consistently stronger fence
> added to name access rules that prevented even consenting adults from
> fiddling with the naughty bits.
I think you, Skip and Moshe are missing a big advantage of having
the __exports__ mechanism. It should allow some attribute access
inside of modules to become faster (like LOAD_FAST for locals).
I think that optimization could be implemented without too much
difficultly. I've never channeled Guido before so I could be off
the mark. If the only advantage is encapsulation then I'm -0.