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. Why do we use __init__ in Python classes? - Stack Overflow

    Classes in Python make up of collections of different data, that behave similarly. Class of dogs consists of Fido and Spot and 199999999998 other animals similar to them, all of them peeing …

  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. poo - duda con el uso del metodo __init__ (), python - Stack …

    Aug 9, 2020 · 1 El init sirve para instanciar objetos con las características (parametros) que se desee, si lo dejas sin parametros siempre instanciaras un objeto sin modificar sus atributos, lo …

  5. python - __init__ as a constructor? - Stack Overflow

    Dive into Python - It would be tempting but incorrect to call this the constructor of the class. It's tempting, because it looks like a constructor (by convention, __init__ is the first m...

  6. 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, …

  7. Python constructors and __init__ - Stack Overflow

    Jan 24, 2012 · Python uses automatic two-phase initialisation - __new__ returns a valid but (usually) unpopulated object (see bool for a counter-example), which then has __init__ called …

  8. 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 …

  9. Is it necessary to include __init__ as the first function every time in ...

    In addition to other answers, one point in your question that has not been addressed : Is it necessary to include __init__ as the first function everytime in a class in Python? The answer …

  10. How to set a python property in __init__ - Stack Overflow

    I have a class with an attribute I wish to turn into a property, but this attribute is set within __init__. Not sure how this should be done. Without setting the property in __init__ this is easy and