#13801: Fix facade set category initialisation
--------------------------+-------------------------------------------------
   Reporter:  vdelecroix  |             Owner:  vdelecroix       
       Type:  defect      |            Status:  new              
   Priority:  major       |         Milestone:  sage-5.6         
  Component:  categories  |          Keywords:  category, facade 
Work issues:              |   Report Upstream:  N/A              
  Reviewers:              |           Authors:  Vincent Delecroix
  Merged in:              |      Dependencies:                   
   Stopgaps:              |  
--------------------------+-------------------------------------------------
 Facade sets are used in many places but there are two small errors that
 prevent from using it everywhere...

 Here is the first error
 {{{
 class A(Parent):
     def __init__(self):
         Parent.__init__(self, facade=True,
 category=((FiniteEnumeratedSets(),Monoids()))
 }}}
 for which we get
 {{{
 sage: A()
 Traceback (most recent call last):
 ...
 AttributeError: 'tuple' object has no attribute 'is_subcategory'
 }}}

 And the second conerns the behavior of .facade_for() which is better
 explained with a minimal example
 {{{
 class B(Parent):
     def __init__(self):
         Parent.__init__(self, category=Sets(), facade=True)
 }}}
 for which we get
 {{{
 sage: b = B()
 sage: b.facade_for()
 Traceback (most recent call last):
 ...
 AttributeError: 'B_with_category' object has no attribute '_facade_for'
 }}}

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