Re: Method acting on arguements passed

2006-05-05 Thread Andrew Gwozdziewycz
> I want a class method to take action depending on the type of the > arguement passed to it. > > ie: > getBook(id) # get the book by ID > getBook(name) # get the book by name Keyword arguments are going to be the best solution, but you'll still have to do checks like in this example which uses

Re: Method acting on arguements passed

2006-05-05 Thread bruno at modulix
Panos Laganakos wrote: > I want a class method to take action depending on the type of the > arguement passed to it. > > ie: > getBook(id) # get the book by ID > getBook(name) # get the book by name > ... > > Other languages use the term function/method overloading to cope with > this. And when I

Re: Method acting on arguements passed

2006-05-05 Thread Duncan Booth
Panos Laganakos wrote: > I want a class method to take action depending on the type of the > arguement passed to it. > > ie: > getBook(id) # get the book by ID > getBook(name) # get the book by name > ... > > Other languages use the term function/method overloading to cope with > this. And when

Re: Method acting on arguements passed

2006-05-05 Thread Diez B. Roggisch
Panos Laganakos wrote: > I want a class method to take action depending on the type of the > arguement passed to it. > > ie: > getBook(id) # get the book by ID > getBook(name) # get the book by name > ... > > Other languages use the term function/method overloading to cope with > this. And when

Method acting on arguements passed

2006-05-05 Thread Panos Laganakos
I want a class method to take action depending on the type of the arguement passed to it. ie: getBook(id) # get the book by ID getBook(name) # get the book by name ... Other languages use the term function/method overloading to cope with this. And when I googled about it seems that GvR is testing