[IronPython] abstract base classes

Ronnie Maor ronnie.maor at gmail.com
Thu Mar 18 18:27:41 CET 2010


cool :-)

On Wed, Mar 17, 2010 at 7:26 PM, Dino Viehland <dinov at microsoft.com> wrote:

>  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
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100318/b047b578/attachment.html>


More information about the Ironpython-users mailing list