#3668: Functionality of "Set"
------------------------------------+---------------------------------------
       Reporter:  ljpk              |         Owner:  tscrim       
           Type:  defect            |        Status:  needs_work   
       Priority:  minor             |     Milestone:  sage-5.9     
      Component:  documentation     |    Resolution:               
       Keywords:  documentation     |   Work issues:               
Report Upstream:  N/A               |     Reviewers:  Nathann Cohen
        Authors:  Travis Scrimshaw  |     Merged in:               
   Dependencies:  #11366            |      Stopgaps:               
------------------------------------+---------------------------------------

Comment (by tscrim):

 Replying to [comment:9 jdemeyer]:
 > What's the point of tests like
 > {{{
 > sage: hash(s) == hash(s)
 > True
 > }}}
 >
 > I prefer to keep the actual hash in this case:
 > {{{
 > sage: hash(s)
 > 1234   # 32-bit
 > 56789  # 64-bit
 > }}}

 The main reason is so that the output does not change if the hash value of
 the underlying object changes, but it still tests that it is hashable.
 (Plus it means we don't need to find a 32 and 64 bit machine to test.) I
 remember there being a discussion about this, but I don't remember/can't
 find which ticket this came up in (I believe there was a sage-devel topic
 on this, but I can't find it either).

 However I can reset the one doctest back and change the other one to
 reflect the behavior of the `__hash__()` function.

 > Minor comment: `#indirect doctest` isn't needed for `_underscored_`
 methods.

 I wrote this before the switch to the new doctesting framework and were
 needed then if `_underscored_` methods weren't explicity called. I'll
 remove them on the next version of the patch.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/3668#comment:10>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to