Author yselivanov
Recipients benjamin.peterson, eric.araujo, jonasw, larry, ncoghlan, nnorwitz, yselivanov
Date 2014-02-14.22:34:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1392417280.42.0.567628895724.issue20625@psf.upfronthosting.co.za>
In-reply-to
Content
> Why would we mangle the names of arguments in the first place?  What possible use case is there?

The use case is multiple inheritance. You can define your methods with keyword and keyword-only params starting with '__', put in them some cached default for speeding up lookup time, and not being worried that someone can override the arg. The second reason is, I believe, is desire to be consistent with mangling methods and attributes.

Again, using mangling for function arguments is, probably, not the best practice, and that, combined with the fact, that people are just starting to play with annotations, explains why this bug was so long unnoticed.

But the semantics of arg names mangling is already there, implemented everywhere but __annotations__.

The attached patch is fairly simple, and really is just a bug fix. It would be great if we can get this in 3.4 (and even in 3.3 and 3.2).
History
Date User Action Args
2014-02-14 22:34:40yselivanovsetrecipients: + yselivanov, nnorwitz, ncoghlan, larry, benjamin.peterson, eric.araujo, jonasw
2014-02-14 22:34:40yselivanovsetmessageid: <1392417280.42.0.567628895724.issue20625@psf.upfronthosting.co.za>
2014-02-14 22:34:40yselivanovlinkissue20625 messages
2014-02-14 22:34:39yselivanovcreate