Actually that example helps. My understanding is that setting facade=True 
allows the elements to have arbitrary objects, necessarily even elements. 
For example:

sage: S = FiniteEnumeratedSet([1, Permutation([1,3,2]), Word('a')]); S
{1, [1, 3, 2], word: a}
sage: S[0].parent()
Integer Ring
sage: S[1].parent()
Traceback
...
AttributeError: 'Permutation_class' object has no attribute 'parent'
sage: S[2].parent()
Words

Perhaps it would be better it would be better to set _facade_for = facade 
in parent.pyx by un-indenting the line one step in Parent.__init__() rather 
than doing a getattr(). I'll also write a quick patch updating the 
documentation for facade parents explaining the facade True.

Thanks,
Travis


On Wednesday, December 5, 2012 11:51:45 PM UTC-8, Vincent Delecroix wrote:
>
> An example in sage.sets.finite_enumerated_set. But an example is not 
> an explanation ;-) 
>
> 2012/12/6 Travis Scrimshaw <tsc...@ucdavis.edu <javascript:>>: 
> >    What is the reason why facade=True is allowable by Parent? It seems 
> like 
> > we always want to pass in the parent(s) which our facade parent is 
> acting 
> > for. 
> > 
> > On Wednesday, December 5, 2012 8:23:01 AM UTC-8, Vincent Delecroix 
> wrote: 
> >> 
> >> I just upload on trac a patch about the initialisation of facade sets 
> >> at #13801. One of the smallest patch I never write... which corrects 
> >> two errors. 
> >> 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sage-combinat-devel/-/imT4IVSUpfMJ.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to