object-oriented programming object __new__(__init__(__eq__(__repr__(__str__(key inherited implemented reimplemented point __new__(__init__(distance_from_origin(__eq__(__repr__(__str__(figure the point class' inheritance hierarchy to create an objecttwo steps are necessary first raw or uninitialized object must be createdand then the object must be initializedready for use some object-oriented languages (such as +and javacombine these two steps into onebut python keeps them separate when an object is created ( shape point())first the special method __new__(is called to create the objectand then the special method __init__(is called to initialize it in practice almost every python class we create will require us to reimplement only the __init__(methodsince the object __new__(method is almost always sufficient and is automatically called if we don' provide our own __new__(method (later in this we will show rare example where we do need to reimplement __new__(not having to reimplement methods in subclass is another benefit of object-oriented programming--if the base class method is sufficient we don' have to reimplement it in our subclass this works because if we call method on an object and the object' class does not have an implementation of that methodpython will automatically go through the object' base classesand their base classesand so onuntil it finds the method--and if the method is not found an attributeerror exception is raised for exampleif we execute shape point()python begins by looking for the method point __new__(since we have not reimplemented this methodpython looks for the method in point' base classes in this case there is only one base classobjectand this has the required methodso python calls object __new__(and creates raw uninitialized object then python looks for the initializer__init__()and since we have reimplemented itpython doesn' need to look further and calls point __init__(finallypython sets to be an object reference to the newly created and initialized object of type point because they are so short and few pages awayfor convenience we will show each method again before discussing it alternative fuzzybool