[IronPython] Magic methods on CLR types

Jeffrey Sax jeffrey at extremeoptimization.com
Tue Dec 1 17:26:44 PST 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://lists.ironpython.com/pipermail/users-ironpython.com/attachments/20091201/79adb519/attachment.htm>

More information about the Users mailing list