My python annoyances so far

flifus at gmail.com flifus at gmail.com
Thu Apr 26 12:07:03 EDT 2007


On 26 Apr, 12:00, Bjoern Schliessmann <usenet-
mail-0306.20.chr0n... at spamgourmet.com> wrote:
> fli... at gmail.com wrote:
> > Hi all. I'm learning python these days. I'm going to use this
> > thread to post, from time to time, my annoyances with python. I
> > hope someone will clarify things to me where I have misunderstood
> > them.
>
> > Annoyances:
>
> > 1. Underscores! What's the deal with that? Especially those double
> > underscores. The best answer I read on this is that the double
> > underscores denotes special methods that the interpreter may
> > automatically use.
>
> That's right. But what's the annoyance here?
>
> It's a clear seperation. A bigger annoyance would be if the method
> name were, e. g., "add". Now you define your own class, don't think
> about this and define a method "add" yourself, and you wonder why
> your class behaves strangely.
>
> > 2. There are modules, there are functions, and there are classes-
> > methods!
>
> You forgot static methods and types. And all of them are objects.
>
> > Wouldn't it have been easier had everything either been a
> > function or a class method?
>
> IMHO no (this isn't Java). Why should I have to define a class if I
> just code a little script with a few functions? That would be
> forcing the programmer into using a programming paradigm.
>
> Will you ask why there is no StringBuffer in Python? :)
>
> Regards,
>
> Björn
>
> --
> BOFH excuse #385:
>
> Dyslexics retyping hosts file on servers

Hi. You wrote c++, didn't you?

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.




More information about the Python-list mailing list