summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2016-11-10 16:29:20 (GMT)
committerGuido van Rossum <guido@python.org>2016-11-10 16:29:20 (GMT)
commit11ca7b5b8f6449137c90ea9c3e905378366aec58 (patch)
tree091d54f0154d31b7a1a59a92d32a876b9b753016
parentf3abcf6a314c0336858b0f84277b38b6ace7614b (diff)
parent0d1acfdf18704614311b89089e9b049d6c020afa (diff)
downloadcpython-11ca7b5b8f6449137c90ea9c3e905378366aec58.zip
cpython-11ca7b5b8f6449137c90ea9c3e905378366aec58.tar.gz
cpython-11ca7b5b8f6449137c90ea9c3e905378366aec58.tar.bz2
Issue #28649: fix second issue with _ForwardRef (#328) (3.6->3.7)
-rw-r--r--Lib/typing.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/typing.py b/Lib/typing.py
index 462cc22..7a64e07 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -218,7 +218,7 @@ class _ForwardRef(_TypingBase, _root=True):
self.__forward_value__ = None
def _eval_type(self, globalns, localns):
- if not self.__forward_evaluated__:
+ if not self.__forward_evaluated__ or localns is not globalns:
if globalns is None and localns is None:
globalns = localns = {}
elif globalns is None: