A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-May/119367.html below:

[Python-Dev] Adding types.build_class for 3.3

[Python-Dev] Adding types.build_class for 3.3 [Python-Dev] Adding types.build_class for 3.3Terry Reedy tjreedy at udel.edu
Tue May 8 23:07:37 CEST 2012
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

More information about the Python-Dev mailing list

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