[IronPython] RE: Inheriting Python classes from .NET classes

Martin Maly martmaly at exchange.microsoft.com
Wed Mar 30 01:40:16 CEST 2005


You found a valid bug in IronPython. One of the reasons this doesn't
work
is that we currently don't support inheriting from .Net classes with no
public constructors. That part is pretty easy to fix. However, there may
be other roadblocks (beyond the one I found so far) to overcome to get
your case working. The reason I think so is that MarshalByRefObject is
a special class in the .Net framework and IronPython may not be ready to
handle all its facets. We are working on it though.

Thanks for the bug report!

Martin


> On Monday, March 28, 2005 10:36 PM
> Sriram Krishnan Wrote:
>
> I've been playing around with the 0.7 release for the last couple of
days.
> I
> tried to write Don Box's Http.Sys ASP.NET web server (Google for
> cache:http://www.gotdotnet.com/team/dbox/default.aspx?key=2004-03-
> 30T07:38:4
> 5Z).
> 
> He extends from MarshalByRefObject
> 
> public class SubDomainCode : MarshalByRefObject
> {...
> 
> 
> When I try to do the same thing in a Python class by writing
> 
> class SubDomainCode(MarshalByRefObject)
> 
> I get a NotImplementedException. I've loaded the required assemblies
> properly. What am I doing wrong here? Or is inheriting .NET types not
> implemented yet in 0.7?
> 
> Thanks,
> Sriram



More information about the Ironpython-users mailing list