[IronPython] IPy2: Problem inheriting from .Net object

Michael Foord fuzzyman at voidspace.org.uk
Wed Nov 19 18:29:02 CET 2008


Curt Hagenlocher wrote:
> This looks like it's equivalent to 19434:
> http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19434

It does look to be the same issue - although that is marked for 2.1 and 
it does 'impinge upon subclassing' substantially.

(The workaround, whilst not always going to be a solution, is a stroke 
of pure evil genius by the way.)

Michael

>
> On Wed, Nov 19, 2008 at 8:42 AM, Glenn Jones 
> <glenn.k.jones+ipy at gmail.com <mailto:glenn.k.jones%2Bipy at gmail.com>> 
> wrote:
>
>     Hi all,
>
>     It's us again!
>     With this object:
>     from System.IO import MemoryStream
>
>     class MockStream(MemoryStream):
>         def __init__(self):
>             MemoryStream.__init__(self)
>             self.closed = False
>
>         def Close(self):
>             print 'Into close'
>             MemoryStream.Close(self)
>             print 'Past close'
>             self.closed = True
>
>     IronPython 1.1:
>     >>> import mockstream
>     >>> m = mockstream.MockStream()
>     >>> m.Close()
>     Into close
>     Past close
>     >>>
>
>     IronPython 2.0 latest code drop:
>     >>> import mockstream
>     >>> m = mockstream.MockStream()
>     >>> m.Close()
>     Into close
>     ....
>     repeated to StackOverflowException
>
>     We'll raise this one and the issue we reported earlier as soon as
>     codeplex starts behaving itself again.
>
>     Thanks
>     Glenn & Michael
>
>
>
>     _______________________________________________
>     Users mailing list
>     Users at lists.ironpython.com <mailto:Users at lists.ironpython.com>
>     http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>   


-- 
http://www.ironpythoninaction.com/




More information about the Ironpython-users mailing list