3 # This module defines a function "str()", which is why "str" can't be used
4 # as a type annotation or type alias.
5 from builtins import str as _str
6 from decimal import Decimal
7 from typing import Any, Callable, Iterable, Mapping, Sequence, Tuple
80 class Error(Exception): ...
82 def setlocale(category: int, locale: _str | Iterable[_str] | None = ...) -> _str: ...
83 def localeconv() -> Mapping[_str, int | _str | list[int]]: ...
84 def nl_langinfo(__key: int) -> _str: ...
85 def getdefaultlocale(envvars: Tuple[_str, ...] = ...) -> tuple[_str | None, _str | None]: ...
86 def getlocale(category: int = ...) -> Sequence[_str]: ...
87 def getpreferredencoding(do_setlocale: bool = ...) -> _str: ...
88 def normalize(localename: _str) -> _str: ...
89 def resetlocale(category: int = ...) -> None: ...
90 def strcoll(string1: _str, string2: _str) -> int: ...
91 def strxfrm(string: _str) -> _str: ...
92 def format(percent: _str, value: float | Decimal, grouping: bool = ..., monetary: bool = ..., *additional: Any) -> _str: ...
94 if sys.version_info >= (3, 7):
95 def format_string(f: _str, val: Any, grouping: bool = ..., monetary: bool = ...) -> _str: ...
98 def format_string(f: _str, val: Any, grouping: bool = ...) -> _str: ...
100 def currency(val: int | float | Decimal, symbol: bool = ..., grouping: bool = ..., international: bool = ...) -> _str: ...
101 def delocalize(string: _str) -> _str: ...
102 def atof(string: _str, func: Callable[[_str], float] = ...) -> float: ...
103 def atoi(string: _str) -> int: ...
104 def str(val: float) -> _str: ...
106 locale_alias: dict[_str, _str] # undocumented
107 locale_encoding_alias: dict[_str, _str] # undocumented
108 windows_locale: dict[int, _str] # undocumented