ef __delitem__(self, index: Union[int, slice]) -> None: ...
    def __getitem__(self, index: Union[int, slice]) -> Union[SubPattern, _CodeType]: ...
    def __setitem__(self, index: Union[int, slice], code: _CodeType): ...
    def insert(self, index, code: _CodeType) -> None: ...
    def append(self, code: _CodeType) -> None: ...
    def getwidth(self) -> int: ...

class Tokenizer:
    string: str
    index: int
    def __init__(self, string: str) -> None: ...
    def match(self, char: str, skip: int = ...) -> int: ...
    def get(self) -> Optional[str]: ...
    def tell(self) -> Tuple[int, Optional[str]]: ...
    def seek(self, index: int) -> None: ...

def isident(char: str) -> bool: ...
def isdigit(char: str) -> bool: ...
def isname(name: str) -> bool: ...
def parse(str: str, flags: int = ..., pattern: Pattern = ...) -> SubPattern: ...

_Template = Tuple[List[Tuple[int, int]], List[Optional[int]]]

def parse_template(source: str, pattern: _Pattern[Any]) -> _Template: ...
def expand_template(template: _Template, match: Match[Any]) -> str: ...
PK