Re: Python is not turned for speed
The Java Virtual Machine has, over a couple of decades, been provided with a wide array of performance optimisations, including highly optimised low pause garbage collectors, JIT compilation and global code optimisation.
The same is now largely true for PyPy.
Strictly speaking __init__
isn't the constructor. You have __new__
for that. The magic methods convention is just that, a convention; though a really useful one because, along with descriptors it means you can provide useful functions without having to worry too much about the method names. This facilitates a certain degree of orthogonaliy across libraries, which is nice.