super Pitfalls

Back to super. Its usage, when using multiple inheritance hierarchy, can be quite dangerous mainly because of initialization of classes. In Python, the base classes are not implicitly called in_init_, and so it is up to the developer to call them. Here In the following example taken from James Knight's website http fuhm.net super-harmful , a c class that calls its base classes using the_init_method will gt gt gt print MRO , x._name_ for x in C._mro_ MRO 'C', 'A', 'B', 'object' gt gt gt C C A B...

Getting started

No matter what operating system you or your customers are running, it will work. Unless you are coding platform-specific things, or using a platform-specific library, you can work on Linux and deploy on other systems, for example. However, thats not uncommon anymore. Ruby, Java, and many other languages work in the same way. Combined with the other qualities that we will discover throughout this book, Python becomes a smart choice for a company's primary development language. This chapter...