> 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
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
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
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 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