On 5/8/2012 12:50 PM, Barry Warsaw wrote: > On May 08, 2012, at 11:59 AM, Nick Coghlan wrote: > >> No, the "mcl" in the call is just the designated metaclass - the >> *actual* metaclass of the resulting class definition may be something >> different. That's why this is a separate method from mcl.__new__. > > I'm not completely sold on adding a class method to type, but I acknowledge > that it's a convenient place to put it. Still, it doesn't feel particularly > more right than adding it to say, the operator module. The operator module strikes me as completely wrong. To me, a function that creates classes (types) belongs either in the types module or attached to the type metaclass. Attaching an alternate constructor to type as a class method would be analogous to attaching an alternate dict constructor to dict (.fromkeys). -- Terry Jan Reedy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4