Overloading methods in C API

Phil Thompson phil at river-bank.demon.co.uk
Sat Jan 18 07:23:15 EST 2003


On Saturday 18 January 2003 11:55 am, Martin v. Löwis wrote:
> Afanasiy <abelikov72 at hotmail.com> writes:
> > How is it expected I create overloaded methods/functions in the C API?
>
> This is not possible. Overloading of methods is not supported in Python.

So you have to implement it yourself by checking the types of the arguments 
and calling the right overload, by which time you really need to be using an 
automatic bindings generator to do it for you.

http://www.riverbankcomputing.co.uk/sip/ is my favorite. :)

Phil





More information about the Python-list mailing list