print('\N{flag: Mauritius}') not supported in py3.9

Abdur-Rahmaan Janhangeer arj.python at gmail.com
Sun Nov 28 08:08:51 EST 2021


Mike Driscoll printed this on Twitter

>>> print('\N{Sauropod}')
🦕

Using py3.9 i got the above.

I found the whole CLDR short name here:
https://unicode.org/emoji/charts/full-emoji-list.html

However when i do

>>> print('\N{flag: Mauritius}')
  File "<stdin>", line 1
    print('\N{flag: Mauritius}')
                               ^
i get

SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in
position 0-18: unknown Unicode character name

So is it that Python3.9 does not support it or what is the issue here?
Thanks

Kind Regards,

Abdur-Rahmaan Janhangeer
about <https://compileralchemy.github.io/> | blog
<https://www.pythonkitchen.com>
github <https://github.com/Abdur-RahmaanJ>
Mauritius


More information about the Python-list mailing list