30. New vs old classes

When declaring a class, always inherit from object as there are additional, optimized properties and behaviors that your class will inherit (e.g. __slots__).

30.1. Don’t do this

1class Car():
2    def __init_(self, make, model):
3        self.make = make
4        self.model = model

30.2. Do this

1class Car(object):
2    def __init_(self, make, model):
3        self.make = make
4        self.model = model