On Thu, Feb 10, 2011 at 9:38 PM, Nicolas M. Thiery <nicolas.thi...@u-psud.fr> wrote: > However one should be careful: the kwarg > options are *not* mutually exclusive as long as they are consistent > (for some loose definition of consistent), and this feature is used in > many places.
My single most common use involves parts_in, though, and that's what doesn't work: Partitions(10, min_length=2, max_length=6, parts_in=[1,2,3,5]) is a completely consistent set of constraints, but it silently drops two of them, as the docs warn. (I'm telling you what you already know, of course, but this was the first case which started to cause me problems.) There are lots of OEIS sequences which involve partitions restricted to some set, so I have to write Partitions(10, parts_in=[1,2,3,5]).filter(lambda x: 2<= len(x) <= 6) or some such variant, which it'd be really nice to avoid.. I even have lots of use cases where it'd be nice to be able to use min_part and parts_in simultaneously, cases where it's more natural to build the parts_in list once. Doug -- Department of Earth Sciences University of Hong Kong -- 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