How To/python/

Python sucks

Documentation

Pythons documentation sucks. Learn from php.net guys! No comments? No examples? Method description sux! Dont know if function raises exception or not. Good method is java method

bool my_function(arg1 [,arg2 [,arg3]]) raises MyCustomException

Private methods

-No private methods? OMG! WTF?- There are private methods. You have to prefix method with double underscore, eg. @def __mymethod(self):...@ .

Huh, why not 17 uderscores? def _____privateMethod is much better!

switch ... case

no switch...case? no, playing with lists and labdas or ifs is not switch...case:

a = 0;
switch a:
    case 0:
        do_this()
        break
    case 1:
    case 2:
    case 3:
        do_that()
        break
    default:
        or_do_this()

See the difference? Now imagine swith with 200 cases and do that with list/lambda shit.

iterating etc.

no i++, i--, ++i, --i operators? Huh, and this is more readable syntax: i,j = j,j+1 ? O...M...G

for loop

no for(i=0; i<x; i++)... loop? It exists in java, c++, javascript etc.

variable scope... safety? not in python

a = "OK "
def destroyWorld():
    # I didnt set "a" inside function so world is save
    try:
        print a + "Destroy The World!"
    except:
        print "The World is save!"
destroyWorld()
>>> OK Destroy The World!

None

None? WTF is None? Why not null? Only good point is that ruby has nil. huh.

! operator

where is "!" operator?

non-magick self

Why i have to declare reference to object when declaring methods? Cannot it be passed transparently, like in all other languages?

Why i have to declare method wit 4 parameter and call it using only 3?

installing modules

No simple installer. easy_install is not siple instaler.