[Python-Dev] New Super PEP (original) (raw)
Armin Rigo arigo at tunes.org
Mon Apr 30 15:14:27 CEST 2007
- Previous message: [Python-Dev] Find file given basename
- Next message: [Python-Dev] New Super PEP
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Previous message: [Python-Dev] Find file given basename
- Next message: [Python-Dev] New Super PEP
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]