Re: Formatted Integer With Specified Number Of Digits

2025-10-19 Thread songbird
Lawrence D’Oliveiro wrote:
> Formatting an integer with 3 digits, excluding base specifier:
>
> >>> "%#0.3x" % 2
> '0x002'
>
> No equivalent to this in any of the other ways that Python allows for
> formatting:
>
> >>> format(2, "#03x")
> '0x2'
>
> (Not what I want)
>
> >>> format(2, "#0.3x")
> Traceback (most recent call last):
>   File "", line 1, in 
> format(2, "#0.3x")
> ~~
> ValueError: Precision not allowed in integer format specifier
>
> >>> "{:#03x}".format(2)
> '0x2'
>
> (Not what I want)
>
> >>> "{:#0.3x}".format(2)
> Traceback (most recent call last):
>   File "", line 1, in 
> "{:#0.3x}".format(2)
> ~^^^
> ValueError: Precision not allowed in integer format specifier
>
> Why not?


  https://github.com/tpauldike/printf


  songbird
-- 
https://mail.python.org/mailman3//lists/python-list.python.org


Re: Proposal to update Unicode handling for German sharp S (ß / ẞ) in Python’s case conversion methods

2025-10-19 Thread python
Thanks again for your detailed reply — I really appreciate it. I have to admit, 
I wasn’t 100% sure about my data, which is why I submitted it for discussion 
before opening a bug report to the Python developers.

I alredy checked Unicode tables, I saw that the capital ß (U+1E9E) was already 
encoded in Unicode 5.1 — so in a sense, Unicode was “ahead of its time,” 
implementing this character well before it was officially recognized in German 
orthography in 2017. The comment in SpecialCasing.txt that “the titlecase 
should never occur in practice” was accurate up to 2017, because capital ß 
simply wasn’t used in real text.

Since 2017, however, capital ß does occur in actual texts, so the legacy 
behavior in Python (ß → SS) no longer reflects reality. I also see that other 
language communities, like Java, discovered this early — for example, a bug 
report was opened in 2017 — but postponed changes until broader adoption. (I 
may have relied a bit too much on AI-generated sources, that not checked that 
the tiket was not suported, it was postponed)

It seems the coding world has become more conservative now, reluctant to change 
anything, even though the need is real. I think we as Python lovers should stay 
aware of this issue so we’re ready when the time comes to align Python with 
modern German orthography. I hope we can count on community support if momentum 
builds to make this change.

Thanks again for helping me understand the nuances here — I really appreciate 
your insight ind try to not forget this legacy to hit the topic again if time 
comes.
-- 
https://mail.python.org/mailman3//lists/python-list.python.org


Re: Proposal to update Unicode handling for German sharp S (ß / ẞ) in Python’s case conversion methods

2025-10-19 Thread Chris Angelico via Python-list
On Mon, 20 Oct 2025 at 02:01,  wrote:
>
> Thanks again for your detailed reply — I really appreciate it. I have to 
> admit, I wasn’t 100% sure about my data, which is why I submitted it for 
> discussion before opening a bug report to the Python developers.
>

Don't. Don't open a discussion based entirely on AI hallucinations. Go
and do some actual research, instead of starting with total
fabrications.

The entire premise of your post was flat-out wrong. Your data was
nothing but hallucinations, and there is nothing to discuss. I'm not
even going to bother reading further, because every post you've
written smells like AI slop.

If you want to have a real discussion, have a real discussion, don't
just give a prompt to an AI and then force the rest of us to work with
that.

ChrisA
-- 
https://mail.python.org/mailman3//lists/python-list.python.org