You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is interesting, I'm wondering when it changed. I'm quite sure that the documentation code has been the actual output when I originally wrote it.
I consider this a documentation bug, in that it does not really show what the function does in a good way. The function does keep the rainbow flag intact as one character/grapheme, the issue is that repr (which is what's used to control the display of the value in the command prompt) of that string returns that not very useful string:
It should be the case that list(grapheme.graphemes("multi codepoint grapheme: " + rainbow_flag))[-1] == rainbow_flag in your snippet.
I'll see if I can understand why repr does this, and if I can find a different multi-scalar grapheme cluster that can be used instead in the demo that does not look weird using repr. Input on that is appreciated.
@alvinlindstam Happy to hear it's only a documentation bug. I'm afraid I have no idea either when repr changed, or what a better multi-scalar grapheme would be.
The documentation gives this code:
In reality, this is how the same code runs locally using Python 3.8, in the default Mac OS Terminal:
I would expect the flag emoji to be held together as one character, like in the documentation.
The text was updated successfully, but these errors were encountered: