mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
22 lines
571 B
Python
22 lines
571 B
Python
import sys
|
|
from collections.abc import Sequence
|
|
from typing import Final
|
|
|
|
if sys.version_info >= (3, 9):
|
|
__all__ = ["iskeyword", "issoftkeyword", "kwlist", "softkwlist"]
|
|
else:
|
|
__all__ = ["iskeyword", "kwlist"]
|
|
|
|
def iskeyword(s: str, /) -> bool: ...
|
|
|
|
# a list at runtime, but you're not meant to mutate it;
|
|
# type it as a sequence
|
|
kwlist: Final[Sequence[str]]
|
|
|
|
if sys.version_info >= (3, 9):
|
|
def issoftkeyword(s: str, /) -> bool: ...
|
|
|
|
# a list at runtime, but you're not meant to mutate it;
|
|
# type it as a sequence
|
|
softkwlist: Final[Sequence[str]]
|