mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
Agent-Logs-Url: https://github.com/RustPython/RustPython/sessions/e4115dbc-b1a5-4a77-90a7-38cf9ac1cdf2 Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com>
21 lines
604 B
Python
21 lines
604 B
Python
import re
|
|
import unicodedata
|
|
|
|
assert "유니코드".isidentifier()
|
|
assert "५".isdecimal()
|
|
assert "\u3000".isspace()
|
|
assert " ".isprintable()
|
|
assert not "\n".isprintable()
|
|
|
|
assert unicodedata.category("\ud800") == "Cs"
|
|
assert unicodedata.lookup("SNOWMAN") == "☃"
|
|
assert unicodedata.name("☃") == "SNOWMAN"
|
|
assert unicodedata.normalize("NFC", "e\u0301") == "é"
|
|
assert unicodedata.digit("²") == 2
|
|
assert unicodedata.decimal("५") == 5
|
|
assert unicodedata.numeric("⅓") == 1 / 3
|
|
|
|
assert re.fullmatch(r"\w+", "가나다")
|
|
assert re.fullmatch(r"\d+", "५६७")
|
|
assert re.fullmatch(r"\s+", "\u3000")
|