[IronPython] abstract base classes

Dino Viehland dinov at microsoft.com
Wed Mar 17 18:26:45 CET 2010


I didn't even realize this is broken.  Probably 2.6.2 at the earliest - it looks like we had the test case which validates this disabled due to a generic "needs to work on 2.6 bug".

I've opened this more specific bug: http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=26499

Thanks for the report!


From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ronnie Maor
Sent: Wednesday, March 17, 2010 3:04 AM
To: Discussion of IronPython
Subject: [IronPython] abstract base classes

This is probably something well known, but I just tried using ABCs in IPy 2.6 for first time and saw that they don't enforce anything:

from abc import ABCMeta, abstractmethod
class A(object):
    __metaclass__ = ABCMeta

    @abstractmethod
    def foo(self, x):
        pass

class B(A): pass # no foo method

b = B() # shouldn't work, but does


Do you know if/when this is planned to be fixed?

thanks
Ronnie

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100317/b60fbfec/attachment.html>


More information about the Ironpython-users mailing list