way to solve the task when using code libraries developed by otherssuch conventions are risky to breaksince internal data structures can changewhile the interface to the class is more static the convention of protected variables is how programmers tell users of the class what can change and what is static library developers can decide to change the internal data structure of classbut users of the class might not even notice this change if the methods to access the data remain unchanged since the class interface is unchangedusers who followed the convention will be finebut users who have accessed protected attributes directly could be in for surprise special methods in the examples abovewe define constructor for each classidentified by its special name __init__this name is recognized by pythonand the method is automatically called every time we create new instance of the class the constructor belongs to family of methods known as special methodswhich are all recognized by double leading and trailing underscores in the name the term special methods could be bit misleadingsince the methods themselves are not really special the special thing about them is the namewhich ensures that they are automatically called in different situationssuch as the __init__ function being called when class instances are created there are many more such special methods that we can use to create object types with very useful properties considerfor instancethe first example of this where the class barometric contained the method value(hto evaluate mathematical function after creating an instance named barowe could call the method with baro value(thoweverit would be even more convenient if we could just write baro(tas if the instance were regular python function this behavior can be obtained by simply changing the name of the value method to one of the special method names that python automatically recognizes the special method name for making an instance callable like regular python function is __call__class barometricdef __init__(selft)self self self self self # # /( * # /( *mol#kg/mol #kpa def __call__(selfh)return self exp(-self *self * /(self *self )