On Feb 16, 3:37 am, Neil Cerutti <[EMAIL PROTECTED]> wrote: > On 2007-02-15, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > > >> def multiAccept( argOfVariousTypes ): > >> if isinstance(argOfVariousTypes,int): > >> # treat like an int > >> elif isinstance(argOfVariousTypes,float): > >> # treat like a float > >> elif isinstance(argOfVariousTypes,(list,tuple)): > >> # treat like a container > > > Is that really called "overloading"? I've never (knowingly) > > come across the term being used in that context before. I've > > always known that as "multiple dispatch" or "polymorphism", > > depending on whether you or the compiler handles the > > dispatching. > > It's due to vague terminology that we're using. > > What the OP wanted to know about was static polymorphism of names > based on function signatures, often refered to informally in the > context of C++ as "function overloading", though it's really > "identifier overloading where identifier refers to a function or > member function".
This what i was asking. > > What Python provides is dynamic polymorphism of names with > single-dispatch. > > I think. ;-) > > -- > Neil Cerutti Thank you all for the information. -- http://mail.python.org/mailman/listinfo/python-list