#11255: Enhance the e_one_star.Patch class
-------------------------------+--------------------------------------------
   Reporter:  tjolivet         |          Owner:  sage-combinat
       Type:  enhancement      |         Status:  needs_review 
   Priority:  major            |      Milestone:  sage-4.7.1   
  Component:  combinatorics    |       Keywords:               
Work_issues:                   |       Upstream:  N/A          
   Reviewer:  Sébastien Labbé  |         Author:  Timo Jolivet 
     Merged:                   |   Dependencies:               
-------------------------------+--------------------------------------------

Comment(by tjolivet):

 Replying to [comment:18 slabbe]:
 > Why do we need copies in those cases?

 Hi, if for some reason the user repaints the returned faces, we don't want
 it to change the color of the faces in the original Patch.

 Otherwise, are you sure about the {{{next(iter(P))}}} trick? The other
 seems faster:

 {{{
 sage: a = frozenset(range(10000))
 sage: timeit('list(a)[0]')
 625 loops, best of 3: 107 µs per loop
 sage: timeit('next(iter(a))')
 625 loops, best of 3: 607 ns per loop
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11255#comment:20>
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