summaryrefslogtreecommitdiff
path: root/Lib/typing.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2016-04-18 07:37:41 -0700
committerGuido van Rossum <guido@python.org>2016-04-18 07:37:41 -0700
commit75dd0dce6a3177033c98c6225738b9819455a95e (patch)
treef2d3dcdcea59d03dd52b931b0d886b6335db23cf /Lib/typing.py
parent9c21bfd1a7e1380c66f9c7b6f5d15bc533f79dbf (diff)
downloadcpython-75dd0dce6a3177033c98c6225738b9819455a95e.tar.gz
typing.py: Consider ellipsis in TupleMeta.__eq__. By Kalle Tuure. github.com/python/typing/pull/201.
Diffstat (limited to 'Lib/typing.py')
-rw-r--r--Lib/typing.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/typing.py b/Lib/typing.py
index 42a9ea3d66..d2750111d4 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -705,7 +705,8 @@ class TupleMeta(TypingMeta):
def __eq__(self, other):
if not isinstance(other, TupleMeta):
return NotImplemented
- return self.__tuple_params__ == other.__tuple_params__
+ return (self.__tuple_params__ == other.__tuple_params__ and
+ self.__tuple_use_ellipsis__ == other.__tuple_use_ellipsis__)
def __hash__(self):
return hash(self.__tuple_params__)