[Python-Dev] Re: Preventing Unicode-related gotchas (Was: pre-PEP: Unicode Security Considerations for Python)

2021-11-13 Thread Terry Reedy
On 11/13/2021 4:35 PM, pt...@austin.rr.com wrote: I’ve not been following the thread, but Steve Holden forwarded me the To explore the extreme case, I wrote a pyparsing transformer to convert identifiers in a body of Python source to mixed font, equivalent to the original source after NFKC no

[Python-Dev] Re: Preventing Unicode-related gotchas (Was: pre-PEP: Unicode Security Considerations for Python)

2021-11-13 Thread Stestagg
This is my favourite version of the issue: е = lambda е, e: е if е > e else e print(е(2, 1), е(1, 2)) # python 3 outputs: 2 2 https://twitter.com/stestagg/status/685239650064162820?s=21 Steve On Sat, 13 Nov 2021 at 22:05, wrote: > I’ve not been following the thread, but Steve Holden forwarded

[Python-Dev] Preventing Unicode-related gotchas (Was: pre-PEP: Unicode Security Considerations for Python)

2021-11-13 Thread ptmcg
I’ve not been following the thread, but Steve Holden forwarded me the email from Petr Viktorin, that I might share some of the info I found while recently diving into this topic. As part of working on the next edition of “Python in a Nutshell” with Steve, Alex Martelli, and Anna Ravencroft,

[Python-Dev] Re: Having Sorted Containers in stdlib?

2021-11-13 Thread Tim Peters
I started writing up a SortedDict use case I have, but it's very elaborate and I expect it would just end with endless pointless argument about other approaches I _could_ take. But I already know all those ;-) So let's look at something conceptually "dead easy" instead: priority queues. They're a

[Python-Dev] Re: Do we need to remove everything that's deprecated?

2021-11-13 Thread Christopher Barker
On Sat, Nov 13, 2021 at 12:01 AM Stephen J. Turnbull > What I think would make a difference is a six-like tool for making > "easy changes" like substituting aliases and maybe marking other stuff > that requires human brains to make the right changes. I think a “2to3” like or “futurize” like tool

[Python-Dev] Re: Do we need to remove everything that's deprecated?

2021-11-13 Thread Stephen J. Turnbull
Victor Stinner writes: > In Python, usually, there is a better alternative. As in life. > Do you have to repeat "You should check for DeprecationWarning in > your code" in every "What's New in Python X.Y?" document? That probably doesn't hurt, but I doubt it does much good for anybody except