Re: [Python-3000] __builtin__ and __builtins__

2007-03-11 Thread Ka-Ping Yee
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

Re: [Python-3000] __builtin__ and __builtins__

2007-03-11 Thread Greg Ewing
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__. >

[Python-3000] __builtin__ and __builtins__

2007-03-11 Thread Ka-Ping Yee
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

Re: [Python-3000] Discussions with no PEPs

2007-03-11 Thread Benji York
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

Re: [Python-3000] PEP for Metaclasses in Python 3000

2007-03-11 Thread Georg Brandl
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