Quick update : I really don't like the following (which comes from the
default sage.structure.parent.__contains__)
{{{
sage: Zmod(12)(5) in ZZ
True
}}}

2012/8/16, Vincent Delecroix <20100.delecr...@gmail.com>:
> Hi,
>
> I'm working on #8920 about factorization of codes between alphabets
> and sets. I got problems with the following behavior::
> {{{
> sage: int(2) in IntegerRange(1,3)
> False
> sage: int(2) in Integers()
> True
> sage: int(2) in NonNegativeIntegers()
> True
> sage: int(2) in PositiveIntegers()
> False
> }}}
> It breaks many test in sage.combinat.*. Note that if we adopt the
> strict convention (ie int(2) not in Integers/IntegerRange/...) then it
> will be impossible to do the following
> {{{
> sage: W = Words("positive integers")
> sage: W([int(1), int(2)])
> word: 12
> }}}
>
> I have two options
>   * modify all files in sage.combinat.* in order to fit the new
> implementation
>   * make PositiveIntegers and IntegerRange accepts silently Python int
>
> Cheers,
> Vincent
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
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