Re: [Python-Dev] Default metaclass in Python 3.0 modules (was: PEP: Consolidating names and classes in the `unittest` module (updated 2008-07-15))

2008-07-15 Thread Benjamin Peterson
On Tue, Jul 15, 2008 at 5:04 AM, Ben Finney <[EMAIL PROTECTED]> wrote: > "Benjamin Peterson" <[EMAIL PROTECTED]> writes: >> >> Line 94-95 in unittest.py (trunk): >> # All classes defined herein are 'new-style' classes, allowing use of >> 'super()' >> __metaclass__ = type > > Hmm, you're right; I s

Re: [Python-Dev] Default metaclass in Python 3.0 modules

2008-07-15 Thread Ben Finney
Nick Coghlan <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > What makes that happen in the case where a class declares no > > superclass? Is there an invisible enforced "__metaclass__ = type" > > for every module? Where can I read about this change? > > The magic is actually in 2.x, not in 3.

Re: [Python-Dev] Default metaclass in Python 3.0 modules

2008-07-15 Thread Nick Coghlan
Ben Finney wrote: Eric Smith <[EMAIL PROTECTED]> writes: Ben Finney wrote: "Benjamin Peterson" <[EMAIL PROTECTED]> writes: Line 94-95 in unittest.py (trunk): # All classes defined herein are 'new-style' classes, allowing use of 'super()' __metaclass__ = type Hmm, you're right; I see that in

Re: [Python-Dev] Default metaclass in Python 3.0 modules

2008-07-15 Thread Ben Finney
Eric Smith <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > "Benjamin Peterson" <[EMAIL PROTECTED]> writes: > >> Line 94-95 in unittest.py (trunk): > >> # All classes defined herein are 'new-style' classes, allowing use of > >> 'super()' > >> __metaclass__ = type > > > > Hmm, you're right; I s

Re: [Python-Dev] Default metaclass in Python 3.0 modules

2008-07-15 Thread Eric Smith
Ben Finney wrote: "Benjamin Peterson" <[EMAIL PROTECTED]> writes: On Mon, Jul 14, 2008 at 6:42 PM, Ben Finney <[EMAIL PROTECTED]> wrote: The `unittest` module will gain the following attribute, to set the default metaclass for classes in the module and thus make all classes in the module part

[Python-Dev] Default metaclass in Python 3.0 modules (was: PEP: Consolidating names and classes in the `unittest` module (updated 2008-07-15))

2008-07-15 Thread Ben Finney
"Benjamin Peterson" <[EMAIL PROTECTED]> writes: > On Mon, Jul 14, 2008 at 6:42 PM, Ben Finney <[EMAIL PROTECTED]> wrote: > > The `unittest` module will gain the following attribute, to set the > > default metaclass for classes in the module and thus make all classes > > in the module part of the n