31. 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__).

31.1. Don’t do this

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

31.2. Do this

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