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/2007-April/072884.html below:

[Python-Dev] New Super PEP

[Python-Dev] New Super PEP [Python-Dev] New Super PEPArmin Rigo arigo at tunes.org
Mon Apr 30 15:14:27 CEST 2007
Hi Calvin,

On Mon, Apr 30, 2007 at 08:34:56AM -0400, Calvin Spealman wrote:
> If you want, you can also grab the reference
> implementation from my blog: http://ironfroggy-code.blogspot.com/

This reference implementation is broken.  It doesn't pass the following
test, for example:

     class A(object):
         __metaclass__ = autosuper
         def f(self):
             if type(self) is B:
                 return "we've got a B"
             else:
                 return "oups"

     class B(A):
         def f(self):
             return Super.f()

     assert B().f() == "we've got a B"

I don't honestly think that you can easily fix the implementation to
pass this test, but I'm ready to check proposed fixes and write tests
for them.  If there is really no working implementation yet then it
shouldn't have been a PEP posted on python-dev in the first place, IMHO
(and the discussion shouldn't go on on python-dev either).


A bientot,

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