跳到内容

脚本代码

基于 ISO 15924 的脚本定义

ISO_15924

基类: str

ISO_15924 解析 ISO 15924 格式的脚本。

from pydantic import BaseModel

from pydantic_extra_types.language_code import ISO_15924

class Script(BaseModel):
    alpha_4: ISO_15924

script = Script(alpha_4='Java')
print(lang)
# > script='Java'