Add shlex.shlex.next in Python 2. (#3389)

shlex.shlex should match the Iterator protocol, for which it needs both
`__iter__` and `__next__` (`next` in Python 2) defined.
This commit is contained in:
Rebecca Chen
2019-10-18 14:13:38 -07:00
committed by Sebastian Rittau
parent bf862d9079
commit ffd73b3e8e

View File

@@ -7,6 +7,7 @@ _SLT = TypeVar('_SLT', bound=shlex)
class shlex:
def __init__(self, instream: IO[Any] = ..., infile: IO[Any] = ..., posix: bool = ...) -> None: ...
def __iter__(self: _SLT) -> _SLT: ...
def next(self) -> str: ...
def get_token(self) -> Optional[str]: ...
def push_token(self, _str: str) -> None: ...
def read_token(self) -> str: ...