About 3,370,000 results
Open links in new tab
  1. oop - What do __init__ and self do in Python? - Stack Overflow

    Jul 8, 2017 · We could use any other legal Python name, but you will likely get tarred and feathered by other Python programmers if you change it to something else. __init__ is a …

  2. python - Duda con clases. ¿Para que sirve __init__? - Stack …

    Aug 30, 2017 · Estoy empezando en esto de programar y me estoy metiendo en la POO. En python, ¿Porqué en las clases se pone __init__?. Y esto, a lo mejor puede sonar estúpido, …

  3. python - What is __init__.py for? - Stack Overflow

    Here's the documentation. Python defines two types of packages, regular packages and namespace packages. Regular packages are traditional packages as they existed in Python …

  4. class - __new__ and __init__ in Python - Stack Overflow

    In fact, it's a good idea to just always inherit from object unless you're writing backwards compat code for very old Python versions. In Python 3, old-style classes are gone and inheritance …

  5. Why do we use __init__ in Python classes? - Stack Overflow

    The characteristic of a type e.g. Germans (hans) are usually defined through the constructor (in python : __init__) at the moment of the instantiation. This is the point where you define a class …

  6. python - Calling parent class __init__ with multiple inheritance, …

    This is why your code didn't work correctly. Because of the way diamond inheritance works in python, classes whose base class is object should not call super().__init__(). As you've …

  7. Understanding Python super() with __init__() methods

    Feb 23, 2009 · Why is super() used? Is there a difference between using Base.__init__ and super().__init__? class Base(object): def __init__(self): print "Base created&quot ...

  8. python - reinitialize an object with self.__init__ (...) - Stack Overflow

    41 Could anybody explain whether it is safe to reinitialize an object by calling "self. init (". as shown in the following simplified example? The reason i'm asking is that i couldn't find this …

  9. Inheritance and init method in Python - Stack Overflow

    Inheritance and init method in Python Asked 14 years, 8 months ago Modified 2 years, 6 months ago Viewed 197k times

  10. syntax - What does __all__ mean in Python? - Stack Overflow

    Sep 4, 2008 · Explain all in Python? I keep seeing the variable __all__ set in different __init__.py files. What does this do? What does __all__ do? It declares the semantically "public" names …