On Tue, Jan 22, 2013 at 04:33:33AM -0800, Nathann Cohen wrote: 
> > Well, for a start you cannot ask Sage to reverse the iteration order of 
> > anything that you can iterate on. 
> > 
> > First example : reversed(NN) 
>

OK, but there is some inconsistent behavior, anyway:


sage: P=Partitions(4)
sage: len(P)
5
sage: C=Compositions(4)
sage: len(C)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)

/home/jyt/monge/TEX/QSCHUR/<ipython console> in <module>()

/home/jyt/src/sage-5.4.1/local/lib/python2.7/site-packages/sage/combinat/combinat.py
 
in __len__(self)
    972             AttributeError: __len__ has been removed; use 
.cardinality() instead
    973         """
--> 974         raise AttributeError, "__len__ has been removed; use 
.cardinality() instead"
    975 
    976     def count(self):

AttributeError: __len__ has been removed; use .cardinality() instead
sage: R=reversed(P)
sage: list(R)
[[1, 1, 1, 1], [2, 1, 1], [2, 2], [3, 1], [4]]



 

>
>

-- 
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/-/FOawuYfuDjwJ.
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