Having thought about it some more, I agree with Daniel Moisset that the
current behavior is correct -- in D(__foo=bar), __foo is a keyword arg
position and those don't get mangled. Anyway, anything mangled would get
mangled according to the containing class (in your example, C), not
according to the class appearing in the call. Using the called class for
mangling would set a dangerous precedent.

So there's your answer -- the current behavior is as it should be. I'll
look into the patch with that in mind.

On Fri, Jul 1, 2022 at 10:54 AM <dw-...@d-woods.co.uk> wrote:

> Guido van Rossum wrote:
> > If you want any kind of traction on this I recommend filing an
> opinionated
> > issue on this (explaining why the current behavior is wrong).
>
> Thanks - I'm asking from the point of view of trying to reimplement it. I
> don't actually have a strong opinion on whether the current behaviour is
> wrong - I'd just like to know if I should match it.
>
> From that point of view I've deviated from your advice slightly and
> created a PR instead to add a test for the current behaviour (
> https://github.com/python/cpython/pull/94500). Hopefully that'll either
> fix it is "intended" or stir up a different decision. I'm happy with either
> outcome.
>
> David
> _______________________________________________
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/DBAJEVHAR6QD7HHECUESU6ZMPQKLBSC5/
> Code of Conduct: http://python.org/psf/codeofconduct/
>


-- 
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/4MTUBIKIFZ5GZ7MHPM7CDWTIQPRAYWWM/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to