object-oriented programming appropriate to our class this will ensure that we never get conflicts with later versions of python even if they introduce new predefined special methods objects usually have attributes--methods are callable attributesand other attributes are data for examplea complex object has imag and real attributes and lots of methodsincluding special methods like __add__(and __sub__ (to support the binary and operators)and normal methods like conjugate(data attributes (often referred to simply as "attributes"are normally implemented as instance variablesthat isvariables that are unique to particular object we will see examples of thisand also examples of how to provide data attributes as properties property is an item of object data that is accessed like an instance variable but where the accesses are handled by methods behind the scenes as we will seeusing properties makes it easy to do data validation inside method (which is just function whose first argument is the instance on which it is called to operate)several kinds of variables are potentially accessible the object' instance variables can be accessed by qualifying their name with the instance itself local variables can be created inside the methodthese are accessed without qualification class variables (sometimes called static variablescan be accessed by qualifying their name with the class nameand global variablesthat ismodule variablesare accessed without qualification some of the python literature uses the concept of namespacea mapping from names to objects modules are namespaces--for exampleafter the statement import math we can access objects in the math module by qualifying them with their namespace name ( math pi and math sin()similarlyclasses and objects are also namespacesfor exampleif we have complex( )the object' namespace has two attributes which we can access ( real and imagone of the advantages of object orientation is that if we have classwe can specialize it this means that we make new class that inherits all the attributes (data and methodsfrom the original classusually so that we can add or replace methods or add more instance variables we can subclass (another term for specialize)any python classwhether built-in or from the standard libraryor one of our own custom classes the ability to subclass is one of the great advantages offered by object-oriented programming since it makes it straightforward to use an existing class that has tried and tested functionality as the basis for new class that extends the originaladding new data attributes or new functionality in very clean and direct way furthermorewe can pass objects of our new class to functions and methods that were written for the original class and they will work correctly we use the term base class to refer to class that is inheriteda base class may be the immediate ancestoror may be further up the inheritance tree another term for base class is super class we use the term subclassderived some library classes that are implemented in cannot be subclassedsuch classes specify this in their documentation