Skip to content
Snippets Groups Projects
Verified Commit 24d74d13 authored by Xavier Robin's avatar Xavier Robin
Browse files

fix: consistent behavior of GetHashCode/hash_code

Behavior was made more consistent. Methods are now available
on all the (Atom|Residue|Chain)(Handle|View)s, including in
Python, and documented. A hash code is an `unsigned long`,
and requesting it on an invalid handle raises an `InvalidHande`
exception.
In practice, the following was implemented:
- Exported to Python for ChainHandles
- Added method on ResidueViews and ChainViews (including Python export)
- Raise InvalidHandle error on ResidueHandle (was: return 0)
- Explicitly check validity of ChainHandle (although behavior was to
  throw an error even without explicit check)
- Changed return value from `long` to `unsigned long` on
  Atom(View|Handle)s.
parent 98e4ebc9
No related branches found
No related tags found
No related merge requests found
Showing
with 130 additions and 9 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment