[Ironpython-users] super() with classmethod - deviation from CPython 2.7 behaviour
Slide
slide.o.mix at gmail.com
Tue Jan 15 05:04:12 CET 2013
Can you file an issue on codeplex please?
On Mon, Jan 14, 2013 at 8:30 PM, Michael van der Kolff <
mvanderkolff at gmail.com> wrote:
> Using the following script:
> class A(object):
> @classmethod
> def x(cls):
> print cls.__name__
>
> class B(A):
> @classmethod
> def x(cls):
> super(B,cls).x()
>
> class C(B):
> pass
>
> class D(B):
> @classmethod
> def x(cls):
> super(D,cls).x()
>
> if __name__ == "__main__":
> B.x()
> C.x()
> D.x()
>
> using CPython 2.7.3 (win32 build), I get the following:
> B
> C
> D
>
> Under IronPython 2.7.3 (64 & 32 bit builds), I get the following:
> B
> B
> B
>
> This also occurs for other class properties, e.g. __doc__ or other
> classmethods - i.e. super() is improperly changing which class object
> is passed in.
>
> Cheers,
>
>
> Michael
> _______________________________________________
> Ironpython-users mailing list
> Ironpython-users at python.org
> http://mail.python.org/mailman/listinfo/ironpython-users
>
--
Website: http://earl-of-code.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20130114/1ce4ff5e/attachment.html>
More information about the Ironpython-users
mailing list