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/2004-August/048116.html below:

[Python-Dev] Re: PEP 318: Can't we all just get along?

[Python-Dev] Re: PEP 318: Can't we all just get along? [Python-Dev] Re: PEP 318: Can't we all just get along?Bob Ippolito bob at redivi.com
Thu Aug 19 22:55:04 CEST 2004
On Aug 19, 2004, at 4:09 PM, Jp Calderone wrote:

> Bob Ippolito wrote:
>> class Foo(object):
>>     __metaclass__ = Bar
>>     ...
>> is *much* different than
>> class Foo(object):
>>     ...
>> Foo = barEquivalentFunction(Foo)
>> which is the same as
>> @barEquivalentFunction
>> class Foo(object):
>>     ...
>
>   Only if you choose to write it such that it is different.  Either 
> can result in effects that persist down the inheritence tree, and 
> either can result in effects that do not.

Of course, but my point is that it's default behavior for the "Bar" 
metaclass to become part of the inheritance graph, where default 
behavior for "barEquivalentFunction" wouldn't ever do such a thing.  
Actually, aside from returning a different class object altogether, the 
only thing I can imagine "barEquivalentFunction" doing that would 
affect the inheritance graph is to mutate __bases__, which is just 
crazy.

-bob
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