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

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to