#13998: hash of a pickled Sequence is broken
----------------------------+-----------------------------------------------
       Reporter:  slabbe    |         Owner:  slabbe  
           Type:  defect    |        Status:  new     
       Priority:  major     |     Milestone:  sage-5.7
      Component:  pickling  |    Resolution:          
       Keywords:            |   Work issues:          
Report Upstream:  N/A       |     Reviewers:          
        Authors:            |     Merged in:          
   Dependencies:            |      Stopgaps:          
----------------------------+-----------------------------------------------

Comment (by slabbe):

 Here is a way to reproduce the problem on a recent version of Sage:

 {{{
 sage: S = Sequence([])
 sage: S.set_immutable()
 sage: del S._Sequence_generic__hash
 sage: hash(S)
 Traceback (most recent call last):
 ...
 AttributeError: 'Sequence_generic' object has no attribute
 '_Sequence_generic__hash'
 sage:
 sage: S._Sequence__hash = 34  # providing this value should fix the above
 error but it doesn't:
 sage: hash(S)
 Traceback (most recent call last):
 ...
 AttributeError: 'Sequence_generic' object has no attribute
 '_Sequence_generic__hash'
 }}}

 This is what I am going to use to doctest the fix.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13998#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to