Salut Nicolas,

Thanks for taking care of it. I would like cartesian products to be
smarter about iteration... especially when one of the factor is
infinite. I have a working implementation of the iterator that you can
use on the sage-combinat misc repo.

Best,
Vincent

2013/11/15, Nicolas M. Thiery <nicolas.thi...@u-psud.fr>:
>       Salut Vincent,
>
> On Thu, Nov 14, 2013 at 10:43:19PM -0500, Vincent Delecroix wrote:
>> For me it is a bug: the behavior of cartesian_product (not
>> CartesianProduct) is not symmetric...
>> {{{
>> sage: C1 = cartesian_product([FiniteEnumeratedSet('abc'),ZZ])
>> The cartesian product of ({'a', 'b', 'c'}, Integer Ring)
>> sage: C1
>> sage: C1.an_element()
>> ('a', 1)
>> }}}
>> but
>> {{{
>> sage: cartesian_product([ZZ,FiniteEnumeratedSet('abc')])
>> Traceback (most recent call last):
>> ...
>> AttributeError: type object
>> 'sage.rings.integer_ring.IntegerRing_class' has no attribute
>> 'CartesianProduct'
>> }}}
>> And by the way, why CartesianProduct still exist ?
>
> Thanks for the report!
>
>> I would be happy to fix that if I know what to do.
>
> I just created #15425 for this, with pointers towards what should be
> done. Please add there any further bug/feature of cartesian products I
> may have missed.
>
> Cheers,
>                               Nicolas
> --
> Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net>
> http://Nicolas.Thiery.name/
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-combinat-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-combinat-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-combinat-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-combinat-devel.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to