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