About 9,260,000 results
Open links in new tab
  1. When do you use 'self' in Python? - Stack Overflow

    Oct 18, 2016 · Are you supposed to use self when referencing a member function in Python (within the same module)? More generally, I was wondering when it is required to use self, not …

  2. oop - What do __init__ and self do in Python? - Stack Overflow

    Jul 8, 2017 · In this case, there are some benefits to allowing this: 1) Methods are just functions that happen defined in a class, and need to be callable either as bound methods with implicit …

  3. What is the purpose of the `self` parameter? Why is it needed?

    For a language-agnostic consideration of the design decision, see What is the advantage of having this/self pointer mandatory explicit?. To close debugging questions where OP omitted a …

  4. Why do I get "TypeError: Missing 1 required positional argument: …

    The self keyword in Python is analogous to this keyword in C++ / Java / C#. In Python 2 it is done implicitly by the compiler (yes Python does compilation internally).

  5. oop - Why do you need explicitly have the "self" argument in a …

    By making the self reference explicit, you're free to refer to any object by that self reference. Also, such a way of playing with classes at runtime is harder to do in the more static languages - not …

  6. php - When should I use 'self' over '$this'? - Stack Overflow

    The keyword self does NOT refer merely to the 'current class', at least not in a way that restricts you to static members. Within the context of a non-static member, self also provides a way of …

  7. python - Pra que serve o "self "? - Stack Overflow em Português

    Aug 30, 2017 · Estou estudando Python para complementar meus programas em Nodejs. Porém por que em Python, uma linguagem que preza a velocidade no desenvolvimento e facilidade …

  8. How to avoid explicit 'self' in Python? - Stack Overflow

    Dec 31, 2009 · The "self" is the conventional placeholder of the current object instance of a class. Its used when you want to refer to the object's property or field or method inside a class as if …

  9. git - SSL certificate problem: self signed certificate in certificate ...

    Aug 2, 2019 · The reason was an SSL certificate problem: 'self-signed certificate in certificate chain.'" Protected question. To answer this question, you need to have at least 10 reputation …

  10. ¿Para qué sirve Self y This en PHP? - Stack Overflow en español

    Jan 10, 2018 · quería saber el uso de estos dos y sus diferencias. He visto que tienen un uso parecido, pero lo que he visto no explican realmente cuál es mejor usar y por qué.