On Sun, Aug 19, 2012 at 08:54:08PM +0200, Vincent Delecroix wrote:
> There is a weirdness in the initialization of Parent with a facade.
> Consider the following example
> 
> class MySet(Parent):
>     def __init__(self):
>         Parent.__init__(self, category=(FiniteEnumeratedSets(), Monoids()))
> 
> The category of an instance of MySet is just a join of the two
> categories. When I add a facade argument to the initialization of
> Parent as in
> 
> class MyFacadeSet(Parent):
>     def __init__(self):
>         Parent.__init__(self, category=(FiniteEnumeratedSets(),
> Monoids()), facade=FreeMonoid(2, 'ab'))
> 
> I got the error "AttributeError: 'tuple' object has no attribute
> 'is_subcategory'". It is few lines in Parent.__init__ but I suspect
> that some ticket solves the problem yet. Does anybody know what should
> I do?

I'll check this out tomorrow, but I suspect I simply screwed up this
use case. Unless there is a patch in the Sage-Combinat queue touching
those lines, I guess you are just the first one hitting it! The tuple
should be converted to a category before amending it with Facade.
Do you want me to handle this in the "more functorial construction
patch" since anyway it touches facades? Otherwise, go ahead.

Cheers,
                                Nicolas
--
Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net>
http://Nicolas.Thiery.name/

-- 
-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org



Reply via email to