Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
cf653bd3
Commit
cf653bd3
authored
Feb 09, 2018
by
Martin Reinecke
Browse files
doc tweaks
parent
50c56bdd
Pipeline
#24645
passed with stage
in 22 minutes and 32 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty4/spaces/domain.py
View file @
cf653bd3
...
...
@@ -35,13 +35,20 @@ class Domain(with_metaclass(
raise
NotImplementedError
def
__hash__
(
self
):
"""Returns a hash value for the object.
Notes
-----
Only members that are explicitly added to
:py:attr:`._needed_for_hash` will be used for hashing.
"""
result_hash
=
0
for
key
in
self
.
_needed_for_hash
:
result_hash
^=
hash
(
vars
(
self
)[
key
])
return
result_hash
def
__eq__
(
self
,
x
):
"""Checks
if
two domains are equal.
"""Checks
whether
two domains are equal.
Parameters
----------
...
...
@@ -62,6 +69,7 @@ class Domain(with_metaclass(
return
True
def
__ne__
(
self
,
x
):
"""Returns the opposite of :py:meth:`.__eq__()`"""
return
not
self
.
__eq__
(
x
)
@
abc
.
abstractproperty
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment