Files
typeshed/stdlib/2/unicodedata.pyi
2016-12-19 22:09:35 -08:00

41 lines
1.9 KiB
Python

"""Stubs for the 'unicodedata' module."""
from typing import Any, TypeVar, Union
ucd_3_2_0 = ... # type: UCD
unidata_version = ... # type: str
# PyCapsule
ucnhash_CAPI = ... # type: Any
_default = TypeVar("_default")
def bidirectional(unichr: unicode) -> str: ...
def category(unichr: unicode) -> str: ...
def combining(unichr: unicode) -> int: ...
def decimal(chr: unicode, default: _default = ...) -> Union[int, _default]: ...
def decomposition(unichr: unicode) -> str: ...
def digit(chr: unicode, default: _default = ...) -> Union[int, _default]: ...
def east_asian_width(unichr: unicode) -> str: ...
def lookup(name: str) -> unicode: ...
def mirrored(unichr: unicode) -> int: ...
def name(chr: unicode, default: _default = ...) -> Union[str, _default]: ...
def normalize(form: str, unistr: unicode) -> unicode: ...
def numeric(chr, default: _default = ...) -> Union[float, _default]: ...
class UCD(object):
unidata_version = ... # type: str
# The methods below are constructed from the same array in C
# (unicodedata_functions) and hence identical to the methods above.
def bidirectional(self, unichr: unicode) -> str: ...
def category(self, unichr: unicode) -> str: ...
def combining(self, unichr: unicode) -> int: ...
def decimal(self, chr: unicode, default: _default = ...) -> Union[int, _default]: ...
def decomposition(self, unichr: unicode) -> str: ...
def digit(self, chr: unicode, default: _default = ...) -> Union[int, _default]: ...
def east_asian_width(self, unichr: unicode) -> str: ...
def lookup(self, name: str) -> unicode: ...
def mirrored(self, unichr: unicode) -> int: ...
def name(self, chr: unicode, default: _default = ...) -> Union[str, _default]: ...
def normalize(self, form: str, unistr: unicode) -> unicode: ...
def numeric(self, chr: unicode, default: _default = ...) -> Union[float, _default]: ...