[Python-Dev] Default metaclass in Python 3.0 modules (was: PEP: Consolidating names and classes in the unittest
module (updated 2008-07-15)) (original) (raw)
Ben Finney ben+python at benfinney.id.au
Tue Jul 15 12:04:33 CEST 2008
- Previous message: [Python-Dev] PEP: Consolidating names and classes in the `unittest` module (updated 2008-07-15)
- Next message: [Python-Dev] Default metaclass in Python 3.0 modules
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Benjamin Peterson" <musiccomposition at gmail.com> writes:
On Mon, Jul 14, 2008 at 6:42 PM, Ben Finney <ben+python at benfinney.id.au> 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 new-style type hierarchy:: > > metaclass = typeIt's already done. 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 Python 2.5.2 'unittest.py'.
Why is it not there in 3.0's 'unittest.py'? Is this achieved some other way?
-- \ “Pinky, are you pondering what I'm pondering?” “I think so, | `\ Brain, but if they called them ‘Sad Meals’, kids wouldn't buy | o) them!” —_Pinky and The Brain | Ben Finney
- Previous message: [Python-Dev] PEP: Consolidating names and classes in the `unittest` module (updated 2008-07-15)
- Next message: [Python-Dev] Default metaclass in Python 3.0 modules
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]