Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-7621

Immutable afw objects should have __hashable__

    Details

    • Type: Story
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: afw
    • Templates:

      Description

      Immutable types with python interfaces should define a _hash_ method so that they can be used as dictionary keys and in sets in python3.

      For example, trying to build a set out of Angles results in the following error:

      >   ras = {s.getRa() for s in cat}
      E   TypeError: unhashable type: 'Angle'
      

        Attachments

          Container Issues

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  Parejkoj John Parejko
                  Watchers:
                  Jim Bosch, John Parejko, Krzysztof Findeisen, Pim Schellart [X] (Inactive), Tim Jenness
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:

                    Summary Panel