[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: Confusing naming of Optional type should be changed

2022-06-30 Thread nverich07
Ah, to be honest, I completely forgot about deprecation for some reason :) Yes, that would definitely be a much better idea to phase out Optional and probably Union in the future actually. Thanks for bringing it up! ___ Python-Dev mailing list -- python

[Python-Dev] Re: Confusing naming of Optional type should be changed

2022-06-30 Thread Paul Bryan
Given that it's now presumably preferred spelling is `str | None` in Python 3.10, why would we not seek to deprecate `Optional[str]` instead of inventing a replacement? On Thu, 2022-06-30 at 17:15 +, nveric...@gmail.com wrote: > I am aware this is clarified in the Python documentation for the

[Python-Dev] Confusing naming of Optional type should be changed

2022-06-30 Thread nverich07
I am aware this is clarified in the Python documentation for the typing module but I and others have thought the naming of Optional is still quite confusing by itself. "Note that this is not the same concept as an optional argument, which is one that has a default. An optional argument with a