About 9,150,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 - Why do you need explicitly have the "self" argument in a …

    Many have proposed to make self a keyword in Python, like this in C++ and Java. This would eliminate the redundant use of explicit self from the formal parameter list in methods.

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

  5. How to bypass certificate errors using Microsoft Edge

    Jul 2, 2020 · To allow a self-signed certificate to be used by Microsoft-Edge it is necessary to use the "certmgr.msc" tool from the command line to import the certificate as a Trusted Certificate …

  6. How to get Python requests to trust a self signed SSL certificate?

    In my case, I was using self-signed certificate generated by mkcert. While curl works fine with such self-signed certificates, the Python requests module does not.

  7. Difference between 'cls' and 'self' in Python classes?

    Why is cls sometimes used instead of self as an argument in Python classes? For example: class Person: def __init__(self, firstname, lastname): self.firstname = firstname self.

  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. What difference does it make to use "self" to define a member in a ...

    So, in the first method self specifies that Python should use the variable (attribute), that "belongs" to the class object we created, not a global one (outside the class).