diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2019-10-17 17:30:04 -0700 |
---|---|---|
committer | Paul McGuire <ptmcg@users.noreply.github.com> | 2019-10-17 19:30:04 -0500 |
commit | 4e1a557ed6886ac67eb08122b5081c6464b699a3 (patch) | |
tree | 50e79239ce216e35beb4081b156dfb161aa970bc /pyparsing.py | |
parent | 6fcd838cadce0f53f56b4316a4fc8740175891ce (diff) | |
download | pyparsing-git-4e1a557ed6886ac67eb08122b5081c6464b699a3.tar.gz |
Py3 cleanup: Remove unnecessary __ne__ method (#140)
Unlink Python 2, in Python 3, __ne__ defaults to the inverse of the
__eq__ method. Can remove the definitions that follow this default.
From the Python docs
https://docs.python.org/3/reference/datamodel.html#object.__ne__
> By default, __ne__() delegates to __eq__() and inverts the result
> unless it is NotImplemented.
Diffstat (limited to 'pyparsing.py')
-rw-r--r-- | pyparsing.py | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/pyparsing.py b/pyparsing.py index 48720f0..f4f0735 100644 --- a/pyparsing.py +++ b/pyparsing.py @@ -2385,9 +2385,6 @@ class ParserElement(object): return vars(self) == vars(other) return False - def __ne__(self, other): - return not (self == other) - def __hash__(self): return id(self) |