What I don't like about Python

Python is one of my favorite programming languages, and is often praised for its design, but there are still some things that I find annoying.

For example, you usually have the entry point of the program at the end of the source file. This is because if it calls any function defined in the module, it has to occur after those functions in the sources. I hate it when you have to spend time looking for the entry point of a program, so I always have a simple main.py file with:

def main():
    ...

if __name__ == '__main__':
    main()

Maybe the reason why I find this somewhat annoying is because when learning Python, it's something I found less intuitive than in C.

When an exception is raised, it can only be caught by the main thread. Or something like that. I have no idea how other languages deal with this issue. Now that I read the documentation again, it seems possible that SystemExit and KeyboardInterrupt, the two exceptions that caused my problems, are just some special cases.

Destructors are useless most of the time, because when written in Python they may break garbage collection, if I remember correctly. try/except and with don't really allow to use RAII à la C++. On the other hand, it's great to have them in C extensions.

I've never figured out how relative imports work in Python 2. I can do without them before I start using Python 3, but they can be useful to avoid name clashes.

I'd like to see more collections in the standard library. For example: linked lists, thread-safe collections, ...

Last, but not least, the naming convention isn't enforced in the standard library. For example, modules that are inspired from other languages are allowed to retain their original convention. This kind of makes sense to me for Unix system calls, but I don't really see the point for high level APIs, like threading or unittest that come from Java.

In the end, I'm happy as long as instances are in lower case and classes in upper case. But the C API automatically provides a module.error exception class, as can be seen in the socket module. This hasn't been fixed in Python 3. Many APIs are written with totally different conventions as well, which isn't surprising since the standard library itself doesn't enforce it.