[Python-Dev] Re: Structural pattern matching and mangling private names

2022-07-12 Thread Guido van Rossum
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 th

[Python-Dev] Re: Structural pattern matching and mangling private names

2022-07-01 Thread dw-git
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 curren

[Python-Dev] Re: Structural pattern matching and mangling private names

2022-06-30 Thread Guido van Rossum
If you want any kind of traction on this I recommend filing an opinionated issue on this (explaining why the current behavior is wrong). On Wed, Jun 15, 2022 at 1:25 PM wrote: > Daniel Moisset wrote: > > I might expect that in a "case D(something=__y)" you get the mangling for > > __y, but I'm n

[Python-Dev] Re: Structural pattern matching and mangling private names

2022-06-15 Thread dw-git
Daniel Moisset wrote: > I might expect that in a "case D(something=__y)" you get the mangling for > __y, but I'm not sure what the implementation does now and I'm writing from > my phone Yes - that case does what you'd expect. Thanks for the reply. ___

[Python-Dev] Re: Structural pattern matching and mangling private names

2022-06-15 Thread Daniel Moisset
I don't remember this topic ever being discussed, but still I wouldn't expect that __something to be mangled, given that it refers to an attribute of an instance of D. I might expect that in a "case D(something=__y)" you get the mangling for __y, but I'm not sure what the implementation does now a