[IronPython] Dynamic overloading of Reflected Methods
Thomas
junk at krow.de
Mon Jan 16 18:17:32 CET 2006
hi,
I'm trying to dynamically overload an objects methods
with IP. Something like:
class A:
def test(self):
print "A"
a = A()
def newtest(self):
print "newtest"
testType = type(a.test)
a.test = testType(newtest, a)
a.test()
prints "newtest" as expected. However I cannot overload
a ReflectedMethod made in C# this way (or don't know how).
A workaround for this, is to implement the methods in a
derived class and override them them there. However these
overloaded methods cannot be called. I have attached a
C# and a Python file to reproduce this.
Any Ideas? Is this supposed to work?
l8r...
Thomas
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: DynamicTest.cs
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060116/3ce176f3/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: DynamicTestPython.py
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060116/3ce176f3/attachment-0001.ksh>
More information about the Ironpython-users
mailing list