|
- 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 self parameter for a method and got a TypeError, use TypeError: method () takes 1 positional argument but 2 were given instead If OP omitted self in the body of the method and got a NameError, consider How can
- security - How do I create a self-signed certificate for code signing . . .
This creates a self-signed (-r) certificate, with an exportable private key (-pe) It's named "My CA", and should be put in the CA store for the current user We're using the SHA-256 algorithm The key is meant for signing (-sky) The private key should be stored in the MyCA pvk file, and the certificate in the MyCA cer file
- php - When should I use self over $this? - Stack Overflow
In PHP 5, what is the difference between using self and $this? When is each appropriate?
- 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
- oop - Why do you need explicitly have the self argument in a Python . . .
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 that's it's necessarily good or bad
- How do I type hint a method with the type of the enclosing class?
However, there's a point to be made about type hint inheritance in relation to self, which is that if you type hint by using a literal copy paste of the class name as a string, then your type hint won't inherit in a correct or consistent way
- How to fix SSL certificate problem: self signed certificate in . . .
Probably something (proxy) or someone (attacker) "steals" your TLS connection and uses own self signed certs What who provides your internet connectivity? Is any proxy configured in the docker daemon configuration or is any proxy env variable defined on the container level?
- How can I make git accept a self signed certificate?
Using Git, is there a way to tell it to accept a self signed certificate? I am using an https server to host a git server but for now the certificate is self signed When I try to create the repo
|
|
|