Ok, i see...
Thank you all :)
--
http://mail.python.org/mailman/listinfo/python-list
"king kikapu" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| > def func(obj):
| > if isinstance(obj, bool):
| > return not obj
| > elif isinstance(obj, int):
| > return obj * 2
| > elif isinstance(obj, basestring):
| > return obj + obj
| > else:
| > raise No
king kikapu a écrit :
> Hi,
>
> i am trying, to no avail yet, to take a C#'s overloaded functions
> skeleton and rewrite it in Python by using closures.
> I read somewhere on the net (http://dirtsimple.org/2004/12/python-is-
> not-java.html) that in Python we can reduce code duplication for
> over
> The closures discussed in the article are not a solution for
> function overloading. They are a solution for function
> composition.
Hmmm
>
> Python generally has no need for function name overloading--if
> you really want it you must do it manually using runtime type
> checking.
>
> def fu
On 2007-07-30, king kikapu <[EMAIL PROTECTED]> wrote:
> i am trying, to no avail yet, to take a C#'s overloaded
> functions skeleton and rewrite it in Python by using closures.
> I read somewhere on the net
> (http://dirtsimple.org/2004/12/python-is- not-java.html) that
> in Python we can reduce co
Hi,
i am trying, to no avail yet, to take a C#'s overloaded functions
skeleton and rewrite it in Python by using closures.
I read somewhere on the net (http://dirtsimple.org/2004/12/python-is-
not-java.html) that in Python we can reduce code duplication for
overloaded functions by using closures.