<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Batang;
        panose-1:2 3 6 0 0 1 1 1 1 1;}
@font-face
        {font-family:"\@Batang";
        panose-1:2 3 6 0 0 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 77.95pt 1.0in 77.95pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'>A question about subclassing, virtual methods, C#/IP
interop, etc in IronPython-0.9.4.&nbsp; I have a library of two classes Helper
&amp; Master (greatly simplified from my actual situation, but analagous):<o:p></o:p></span></font></p>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>using
System;<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>namespace
TestLib<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>{<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
public class Helper<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
int _id;<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
public Helper(int id)<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
_id = id;<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
public void DoSomething()<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Console.WriteLine(&quot;Helper&#8221;);<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
public class Master<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
protected virtual Helper CreateHelper(int id)<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return new Helper(id);<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
public void DoSomething()<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Helper helper = CreateHelper(0);<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
helper.DoSomething();<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>}<o:p></o:p></span></font></p>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'>Master has a factory-style method that creates a helper, and
then invokes a method on it.&nbsp; I want to insert some throw-away behavior,
by subclassing both Master and Helper, so that FooMaster creates a FooHelper,
and then invokes the FooHelper version of DoSomething.<o:p></o:p></span></font></p>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>from
TestLib import *<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>class
FooHelper(Helper):<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
def __init__(self, id):<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
self._id = id<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
def DoSomething(self):<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
print &quot;FooHelper&quot;<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>class
FooMaster(Master):<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
def CreateHelper(self, id):<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return FooHelper(id)<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'># ===
Main ==================<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>fooMaster
= FooMaster()<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>fooMaster.DoSomething()<o:p></o:p></span></font></p>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'>I expect this to print out &#8220;FooHelper&#8221;. Instead
it prints out &#8220;Helper&#8221;.<o:p></o:p></span></font></p>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'>Note that if I were to define the superclasses Helper/Master
in Python instead of C#, everything works like a charm, and it prints out &#8220;FooHelper&#8221;:<o:p></o:p></span></font></p>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>class
Helper:<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
_id = 0<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
def __init__(self, id):<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
self._id = id;<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
def DoSomething(self):<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
print &quot;Helper&quot;<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>class
Master:<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
def CreateHelper(self, id):<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return Helper(id)<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
def DoSomething(self):<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
self.CreateHelper(10).DoSomething()<o:p></o:p></span></font></p>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'>This leads me to believe it is impossible for a C# object to
call a Python method that overrides a virtual method. &nbsp;However, also note
that if I define the Helper class to be abstract in C#, it also works fine and
I see &#8220;FooHelper&#8221;.<o:p></o:p></span></font></p>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>using
System;<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>using
System.Text;<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>namespace
TestLib<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>{<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
public abstract class Helper<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
int _id;<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
public Helper(int id)<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
_id = id;<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
public abstract void DoSomething();<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
public class Master<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
protected virtual Helper CreateHelper(int id)<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return null;<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
public void DoSomething()<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Helper helper = CreateHelper(0);<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
helper.DoSomething();<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>}<o:p></o:p></span></font></p>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'>Furthermore, when I simplify things even further, it also
works the way I&#8217;d expect:<o:p></o:p></span></font></p>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>public
class Helper<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>{<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
public Helper(int id) { }<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
public virtual void DoSomething() { Console.WriteLine(&quot;Helper&quot;); }<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>}<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>public
class Master<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>{<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
public Master(Helper helper) { helper.DoSomething();&nbsp; }<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>}<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>class
FooHelper(Helper):<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
def __init__(self, id): pass<o:p></o:p></span></font></p>

<p class=MsoPlainText style='margin-left:.5in'><font size=1 color="#3366ff"
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:#3366FF'>&nbsp;&nbsp;&nbsp;
def DoSomething(self): print &quot;FooHelper&quot;<o:p></o:p></span></font></p>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'>Can anybody tell me what&#8217;s going on?&nbsp; Is this a
bug in IronPython or am I doing something wrong?<o:p></o:p></span></font></p>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'>Many thanks,<o:p></o:p></span></font></p>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial'>Michael<o:p></o:p></span></font></p>

<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>