[IronPython] Magic methods on CLR types

Jeffrey Sax jeffrey at extremeoptimization.com
Wed Dec 2 02:26:44 CET 2009

Is there a way to add magic methods like __repr__, __call__, etc. to CLR


1.       Can it be done in the external CLR assembly without polluting the
API for other languages? If so, how?

2.       Can it be done using F# style type augmentations by redefining such
methods on the Python type corresponding to the CLR type? If so, how?

3.       If neither of these alternatives is possible, is there a third way?




Jeffrey Sax

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20091201/79adb519/attachment.html>

More information about the Ironpython-users mailing list