#13566: Simplicial complex examples as singletons
----------------------------------+-----------------------------------------
   Reporter:  tscrim              |             Owner:  tscrim        
       Type:  enhancement         |            Status:  new           
   Priority:  minor               |         Milestone:  sage-5.5      
  Component:  algebraic topology  |          Keywords:  simplicial    
Work issues:                      |   Report Upstream:  N/A           
  Reviewers:                      |           Authors:                
  Merged in:                      |      Dependencies:  #13244, #12587
   Stopgaps:                      |  
----------------------------------+-----------------------------------------
 Since each of the examples are unique, there should only be one
 (immutable) instance of each. In other words, we do not recreate the
 example each time it is called. For example
 {{{
 sage: S1 = simplicial_complexes.KleinBottle()
 sage: S2 = simplicial_complexes.KleinBottle()
 sage: S1 == S2
 True
 sage: S1 is S2
 False
 }}}
 where the last should return `true`. Possibly do this by something like
 {{{
 def KlienBottle(self):
     if not hasattr(self, "_klien_bottle_output"):
         self._klien_bottle_output = SimplicialComplex(facets)
     return self._klien_bottle_output
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13566>
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