About 8,060,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. Why do I get "TypeError: Missing 1 required positional argument: …

    Another possibility in the neighborhood of this answer is if you declare a method as an @staticmethod and then include (or retain) self as the first positional argument..

  5. How can I generate a self-signed SSL certificate using OpenSSL?

    The W3C's WebAppSec Working Group is starting to look at the issue. See, for example, Proposal: Marking HTTP As Non-Secure. How to create a self-signed certificate with …

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

  7. Difference between Python self and Java this - Stack Overflow

    Feb 11, 2014 · Moving further: Technically both self and this are used for the same thing. They are used to access the variable associated with the current instance. Only difference is, you …

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

  9. Python class methods: when is self not needed - Stack Overflow

    Jun 25, 2017 · You don't have to name it self, that's just a convention (but one you should stick to, as anything else would be confusing), but you always have to include that initial parameter that …

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