--- /dev/null
+# Source: https://hg.python.org/cpython/file/2.7/Lib/sre_compile.py\r
+# and https://github.com/python/cpython/blob/master/Lib/sre_compile.py\r
+\r
+import sys\r
+from sre_parse import SubPattern\r
+from typing import Any, List, Pattern, Tuple, Type, TypeVar, Union\r
+\r
+MAXCODE = ... # type: int\r
+if sys.version_info < (3, 0):\r
+ STRING_TYPES: Tuple[Type[str], Type[unicode]]\r
+ _IsStringType = int\r
+else:\r
+ from sre_constants import _NamedIntConstant\r
+ def dis(code: List[_NamedIntConstant]) -> None: ...\r
+ _IsStringType = bool\r
+\r
+def isstring(obj: Any) -> _IsStringType: ...\r
+def compile(p: Union[str, bytes, SubPattern], flags: int = ...) -> Pattern: ...\r