Closed
Description
Steps To Reproduce
sage: p = PlanePartitions(4).an_element(); p
Plane partition [[4]]
sage: hash(p)
Traceback (most recent call last):
...
TypeError: unhashable type: 'list'
Expected Behavior
sage: p = PlanePartitions(4).an_element()
sage: hash(p)
should return a hash.
Actual Behavior
A TypeError
is raised.
Additional Information
Plane partitions inherit from ClonableArray
, but the elements of the array are lists, eg.:
def __init__(self, parent, pp, check=True):
...
if isinstance(pp, PlanePartition):
ClonableArray.__init__(self, parent, pp, check=False)
else:
pp = [list(_) for _ in pp]
if pp:
for i in reversed(range(len(pp))):
while pp[i] and not pp[i][-1]:
del pp[i][-1]
if not pp[i]:
pp.pop(i)
ClonableArray.__init__(self, parent, pp, check=check)
...
Environment
irrelevant.
Checklist
- I have searched the existing issues for a bug report that matches the one I want to file, without success.
- I have read the documentation and troubleshoot guide