text: Q:
  
  What are the unique methods of a class called?
  
  Say that if you had a class, and you defined it as:
  class A:
      pass
  
  And when you use the function:
  dir(A)
  
  Which returns all the methods and attributes the class contains:
  ['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__']
  
  My question is, what are methods with a double underscore before and after them such as __class__, __delattr__, __dict__, __init__, called? I've assumed they were called constructor, but after doing research - it seems that term only refers to the __init__ function. Does anyone know if there's a specific category to call these methods by?
  
  A:
  
  They are called special method names:
  
  Special method names
  A class can implement certain operations that are invoked by special syntax (such as arithmetic operations or subscripting and slicing) by defining methods with special names. This is Python’s approach to operator overloading, allowing classes to define their own behavior with respect to language operators.
  
  and special attributes:
  
  Some of the type descriptions below contain a paragraph listing ‘special attributes.’ These are attributes that provide access to the implementation and are not intended for general use.
  
  Names that start with a double underscore and end in a double underscore, are reserved names. See the Reserved classes of identifiers:
  
  __*__
    System-defined names. These names are defined by the interpreter and its implementation (including the standard library). Current system names are discussed in the Special method names section and elsewhere. More will likely be defined in future versions of Python. Any use of __*__ names, in any context, that does not follow explicitly documented use, is subject to breakage without warning.
  
  They are sometimes referred to as dunder names, as an abbreviation of the double-underscore. Magic names is also a popular term for them, but neither are official.
  Note that the __init__ method is the instance initialiser hook, it is not the constructor. The instance has already been constructed by the time this method is called. If you need to hook into construction, implement the __new__ method.
  
  