Re: [Python-ideas] Sorry for yet another self discussion

2018-05-14 Thread Terry Reedy
On 5/10/2018 3:58 PM, stefano wrote: 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

Re: [Python-ideas] Sorry for yet another self discussion

2018-05-14 Thread Chris Barker via Python-ideas
> 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)"? > because "self" in this case is a class instance, passed in at method call time. but "whatevermethod" is a class attribute. note th

Re: [Python-ideas] Sorry for yet another self discussion

2018-05-10 Thread Steven D'Aprano
On Thu, May 10, 2018 at 07:58:12PM +, stefano wrote: > The disturbing part of the "self parameter" is the asymmetry of the > definition and the call. Why is that disturbing? There is always some asymmetry between *defining* a function and *calling* a function. Function definitions: def

[Python-ideas] Sorry for yet another self discussion

2018-05-10 Thread stefano
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