summaryrefslogtreecommitdiff
path: root/Lib/argparse.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2014-05-26 00:44:35 -0700
committerRaymond Hettinger <python@rcn.com>2014-05-26 00:44:35 -0700
commit79cae680a3c84477fdcadeed14f8392842d93c01 (patch)
tree208da89811792eb440f9914fc2cdf77fca43a5a6 /Lib/argparse.py
parentaa92d342f1249d3f8b5b7ca28a6efe43dd7e1eb5 (diff)
parentdea46ec9654a6412e74a6f8dfbdf97ff97516670 (diff)
downloadcpython-git-79cae680a3c84477fdcadeed14f8392842d93c01.tar.gz
merge
Diffstat (limited to 'Lib/argparse.py')
-rw-r--r--Lib/argparse.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/argparse.py b/Lib/argparse.py
index 5ad7e13a48..83878b1527 100644
--- a/Lib/argparse.py
+++ b/Lib/argparse.py
@@ -1198,9 +1198,13 @@ class Namespace(_AttributeHolder):
setattr(self, name, kwargs[name])
def __eq__(self, other):
+ if not isinstance(other, Namespace):
+ return NotImplemented
return vars(self) == vars(other)
def __ne__(self, other):
+ if not isinstance(other, Namespace):
+ return NotImplemented
return not (self == other)
def __contains__(self, key):