Код: Выделить всё
>>> type(re.compile(""))
Код: Выделить всё
def my_func(compiled_regex: _sre.SRE_Pattern):
Код: Выделить всё
>>> import _sre
>>> from _sre import SRE_Pattern
Traceback (most recent call last):
File "", line 1, in
ImportError: cannot import name 'SRE_Pattern'
Подробнее здесь: https://stackoverflow.com/questions/395 ... e-for-mypy
Мобильная версия