You should be able to do it exactly like that: A.f(x)<br><br>
<div class="gmail_quote">On Fri, Mar 27, 2009 at 11:25 AM, Carolyn Johnston (MSNAR) <span dir="ltr">&lt;<a href="mailto:carolj@microsoft.com">carolj@microsoft.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote"><br>You are trying to apply C++ and C# thinking to Python.  This is a<br>fundamental philosophical difference between the languages.  Python<br>
doesn&#39;t care what the object IS.  Python only cares what it EXPOSES.  If<br>it has a GetName() method, you can call it, no matter what the object<br>ancestry was. -- tim<br><br>Well, C++ was my first language -- but I am a huge fan of Python and IronPython. Since I&#39;ve dived into the deep end philosophically, I may as well push it a bit further.<br>
<br>One of the most useful aspects of IronPython for me is the way that I can use IronPython as a loosely typed test environment for .NET classes that I&#39;ve built in C#. Suppose I have a class B which is a subclass of A, which both define a function f(x). Suppose I have an object of class B on which (for some purely hypothetical reason) I want to run A.f(x) rather than B.f(x). This is clearly at the interface of .NET design and Pythonian antiObjectian philosophy. Here&#39;s my question: is it doable within IronPython, or is it not? And if so, how?<br>
<br><br>Thanks,<br>:) Carolyn<br><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br><a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
<br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br><a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
</blockquote></div><br>