My python annoyances so far

7stud bbxx789_05ss at yahoo.com
Thu Apr 26 16:50:46 CEST 2007


flifus at gmail.com wrote:
> Annoyances:
>

Every language has annoyances.  Python is no exception.  Post away.
Anyone that is offended can go drink a Guinness.

> 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. For example, 4+4 get expanded by the interpreter to
> 4.__add__(4).
>

I thought those were pretty ugly myself.  Now, I am used to them.

> 2. There are modules, there are functions, and there are classes-
> methods! Wouldn't it have been easier had everything either been a
> function or a class method?

I know what you mean.  I always write:

someStringVar.len

and then I backspace and retype:

len(someString).

But then again, I can never remember whether length is a member or a
method in other languages.




More information about the Python-list mailing list