object-oriented programming some object-oriented languages have two features that python does not provide the first is overloadingthat ishaving methods with the same name but with different parameter lists in the same class thanks to python' versatile argument-handling capabilities this is never limitation in practice the second is access control--there are no bulletproof mechanisms for enforcing data privacy howeverif we create attributes (instance variables or methodsthat begin with two leading underscorespython will prevent unintentional accesses so that they can be considered to be private (this is done by name manglingwe will see an example in just as we use an uppercase letter as the first letter of custom moduleswe will do the same thing for custom classes we can define as many classes as we likeeither directly in program or in modules--class names don' have to match module namesand modules may contain as many class definitions as we like now that we have seen some of the problems that classes can solveintroduced the necessary terminologyand covered some background matterswe can begin to create some custom classes custom classes ||in earlier we created custom classescustom exceptions here are two new syntaxes for creating custom classesclass classnamesuite class classname(base_classes)suite since the exception subclasses we created did not add any new attributes (no instance data or methodswe used suite of pass ( nothing added)and since the suite was just one statement we put it on the same line as the class statement itself note that just like def statementsclass is statementso we can create classes dynamically if we want to class' methods are created using def statements in the class' suite class instances are created by calling the class with any necessary argumentsfor examplex complex( creates complex number and sets to be an object reference to it attributes and methods |let' start with very simple classpointthat holds an (xycoordinate the class is in file shape pyand its complete implementation (excluding docstringsis show hereclass point