#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 slabbe):

 Replying to [comment:20 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.

 What if the user wants to get the faces of a certain type and does not
 want to repaint them? We do useless copies in that case. I feel like those
 methods should return the faces as they are. I think the user may make the
 copies himself.

 It is like if the patch was a Python set. Iterating through it iterates
 through its elements (not copies of them).

 {{{
 sage: f = Face((0,0,0), 1, color='red')
 sage: g = copy(f)
 sage: g.color()
 RGB color (1.0, 0.0, 0.0)
 sage: f.color('black')
 sage: g.color()
 RGB color (1.0, 0.0, 0.0)
 sage: f.color()
 RGB color (0.0, 0.0, 0.0)
 }}}

 Sébastien

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