[Python-ideas] Sorry for yet another self discussion

stefano warste at gmail.com
Thu May 10 15:58:12 EDT 2018

I know that "self" parameter have been discussed a lot, but still I didn't
find this proposal. If it was instead take my sincere apologies and please
forget this mail.

The disturbing part of the "self parameter" is the asymmetry of the
definition and the call. So I was thinking: why not do define the methods
like: "def self.whatevermethod(par1, par2, etc)" instead of "def
whatevermethod(self, par1, par2, etc)"?

This will allow the call and the definition to be written exactly in the
same way, still leaving the "clarity" of the additional input for the
function. Moreover this can be made backward compatible (even still without
making self a reserved word, to be considered anyway).

I've been short by purpose but ready to elaborate if needed.

Thank you for the attention.


More information about the Python-ideas mailing list