Make all single-constraint TypeVars use bound= insteads (plus hack) (#1118)

Another attempt for #804, to unblock python/mypy#2626.
There's a work-around here for python/mypy#1551.
This commit is contained in:
Guido van Rossum
2017-03-29 14:59:24 -07:00
committed by GitHub
parent 7c413c904d
commit 1ea3d2de57
2 changed files with 6 additions and 5 deletions

View File

@@ -9,7 +9,7 @@ from enum import Enum
import sys
mm = MutableMapping[str, Any]
_D = TypeVar('_D', mm)
_D = TypeVar('_D', bound=mm)
if sys.version_info >= (3,):
_Path = str
else: