My python annoyances so far
Marc 'BlackJack' Rintsch
bj_666 at gmx.net
Thu Apr 26 13:45:38 EDT 2007
In <1177603623.774892.230390 at t38g2000prd.googlegroups.com>, flifus wrote:
> Well, why do some things in the library have to be functions, and
> other things have to be class methods?
>
> Why aren't they all just either functions or class methods? like
> perhaps ruby.
To which class should `sorted()` belong to then? Or the functions in the
`math` module? What about `itertools`?
In languages without functions, like Java, you'll have to write static
methods where you really want functions, just because Java forces you to
stuff everything into classes.
And instead of a simple ``lambda`` function one needs to write an
anonymous class with a method. Quite convoluted.
Ciao,
Marc 'BlackJack' Rintsch
More information about the Python-list
mailing list