Skip to content
Snippets Groups Projects
  • Xavier Robin's avatar
    24d74d13
    fix: consistent behavior of GetHashCode/hash_code · 24d74d13
    Xavier Robin authored
    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.
    Verified
    24d74d13
    History
    fix: consistent behavior of GetHashCode/hash_code
    Xavier Robin authored
    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.