Is there anyway of making Python methods have access to the class fields/methods without using the self parameter?
It's really annoying having to write self. self. self. self. The code gets so ugly to the point I'm thinking of not using classes anymore purely for code aesthetics. I don't care about the risks or best practices. I just want not to see self anymore.
P.S. I know about the renaming possibility but it's not the point.
This blog by Guido explains why it's here to stay: http://neopythonic.blogspot.co.uk/2008/10/why-explicit-self-has-to-stay.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With