Pythonã§ã¯Unicodeã³ã¼ããã¤ã³ãã«ãããªãã©ã«è¡¨ç¾*1ã®ä»ã«ãUnicodeæåãã¼ã¿ãã¼ã¹(UCD; Unicode Character Database)*2ã«æºããåå表ç¾ããµãã¼ãããã
print("\U0001F4DB") # ð print("\N{NAME BADGE}") # ð print("\N{TOFU ON FIRE}") # SyntaxError: # (unicode error) 'unicodeescape' codec can't decode bytes in position 0-15: # unknown Unicode character name
é¢é£URL
- The Python Language Reference, String and Byte literals
- JTC1/SC22/WG21 P2071R0 Named universal character escapes
- https://twitter.com/notjosh/status/513444677732024321