[IronPython] Plans for overloads?

Morgan Martinet ironpython at mmm-experts.com
Fri Jul 22 01:19:15 CEST 2005

>Interesting, but this seems to be purely for decorating method definitions,
>not method calls, and I'm not sure how any similar syntax would help.
This is not completely true. The way decorators work is that they wrap the
decorated object (either the function or another decorator if you cascade
them). The decorator is a Python object by itself, that can override
__call__ to implement its own behaviour, allowing you to route the call to
the proper method for instance. The decorator object can also contain its
own attributes that would help it take the right decision...

>The only thing I could think of would be to hint the parser, which may be
>what you had in mind.
This is also a possibility as it would respect the Python syntax but would
allow you to introduce new attributes...


More information about the Ironpython-users mailing list