When I first started learning python and read about how they do class methods, I was a bit thrown off. To be an object-level method (rather than class-level, like Java static methods), the first parameter needed to be self. Technically, you could name it whatever you wanted, but the first parameter was supposed to be assumed to be an object of the same type as what you were working on, and it is convention to call it self.
I was confused. Up until then, I’d marveled at how python kept everything more concise than pretty much every other language that I’d worked with. Now they were putting in something that required extra typing. It took a while to understand why it was even necessary, especially since it was a little while yet before they even showed class-level methods. Then I realized that they would need something to distinguish between the two, and pretty much anything you did to accomplish that goal would require extra typing. So I let it go. Continue Reading



