This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steven.daprano
Recipients eryksun, ezio.melotti, maxbachmann, steven.daprano, vstinner
Date 2021-09-05.13:15:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1630847748.93.0.0515886498159.issue45105@roundup.psfhosted.org>
In-reply-to
Content
Eryk Sun said:

> The original string has the Phoenician right-to-left character at index 1, not at index 3.


I think you may be mistaken. In Max's original post, he has

    s = '000X'

where the X is actually the Phoenician ALF character. At least that is how it is displayed in my browser.

(But note that in the Windows terminal, Max has '0X00' instead.)

Max's demonstration code shows a discrepancy between extracting the chars one by one using indexing, and with list. Simulating his error:

    s = '000X'  # X is actually ALF
    list(s)
    # --> returns [0 0 0 X]
    [s[i] for i in range(4)]  # indexing each char one at a time
    # --> returns [0 X 0 0]

I have not yet been able to replicate that reported behaviour.

I agree totally with Eryk Sun that this is probably not a Python bug. He thinks it is displaying the correct behaviour. I think it is probably a browser or xterm bug.

But unless someone can replicate the mismatch between list and indexing, I doubt it is something we can do anything about.
History
Date User Action Args
2021-09-05 13:15:48steven.dapranosetrecipients: + steven.daprano, vstinner, ezio.melotti, eryksun, maxbachmann
2021-09-05 13:15:48steven.dapranosetmessageid: <1630847748.93.0.0515886498159.issue45105@roundup.psfhosted.org>
2021-09-05 13:15:48steven.dapranolinkissue45105 messages
2021-09-05 13:15:48steven.dapranocreate