python and using 'self' in methods -


Whatever I read, the 'self' parameter is similar to 'this'.

Is this true?

If this is optional, what will you do, if this method has not passed itself?

Yes, it is used in this way. Note that this is a positional parameter and what you can call it; Although it is a strong conference to call self (not this or something else), some statusal parameters should be for a useful example method ; This is not optional.


Comments