On Mon, 12 Mar 2007, Greg Ewing wrote:
> Changing __main__ to match would seem to be a
> good idea.
[...]
> There might be merit in renaming __builtins__
> to something less confusable, at the expense of
> breaking existing code which refers to it.
Cool.
> I don't think it would be such a good
Ka-Ping Yee wrote:
> A little investigation reveals:
>
> In module __main__:
> __builtins__ is a reference to module __builtin__.
> __builtin__ only exists if you import it.
>
> In any other module:
> __builtins__ is a reference to module __builtin__'s __dict__.
>
For a long time __builtin__ and __builtins__ have mystified me.
Usually I end up guessing -- in any given namespace, one of the
two will exist, and it will either be a module or a dictionary --
but I never committed to memory which name or type to expect.
A little investigation reveals:
In mo
Greg Ewing wrote:
> Barry Warsaw wrote:
>
>> We already have an established, community accepted implementation of
>> interfaces,
>
> Really? Which one is that?
I believe Barry was referring to zope.interface.
--
Benji York
http://benjiyork.com
___
P
Greg Ewing schrieb:
> Some more metaclass syntax ideas:
>
>class Foo[Meta](bases):
> ...
>
>Meta class Foo(bases):
> ...
>
> although I don't like the way the latter moves the
> 'class' keyword away from the beginning.
You could even unify metaclass and class decorator, if you