Improve cmp_op in opcode (#6884)

This commit is contained in:
Nikita Sobolev
2022-01-10 14:07:04 +03:00
committed by GitHub
parent 9de17bd5ae
commit a8c9c194b4

View File

@@ -1,7 +1,23 @@
import sys
from typing import Sequence
from typing_extensions import Literal
cmp_op: Sequence[str]
if sys.version_info >= (3, 9):
cmp_op: tuple[Literal["<"], Literal["<="], Literal["=="], Literal["!="], Literal[">"], Literal[">="]]
else:
cmp_op: tuple[
Literal["<"],
Literal["<="],
Literal["=="],
Literal["!="],
Literal[">"],
Literal[">="],
Literal["in"],
Literal["not in"],
Literal["is"],
Literal["is not"],
Literal["exception match"],
Literal["BAD"],
]
hasconst: list[int]
hasname: list[int]
hasjrel: list[int]