On Apr 25, 2010, at 8:38 AM, Nathan O'Treally wrote:
On 25 Apr., 09:30, Simon King <simon.k...@nuigalway.ie> wrote:
* Other users may believe that a rose is a rose is a rose, and 1 is 1
is 1. Such users would find it gross that GF(2)(1)==1 and 1==GF(3)
(1),
but GF(3)(1)!=GF(2)(1).
Btw, a rose might be a rose in Python, but not in Sage:
1 is 1 # Python
True
sage: 1 is 1 # preparsed to "Integer(1) is Integer(1)"
False
sage 1r is 1r # Python behavoir
True
Is this already addressed (in the context of "is")?
I consider that an implementation detail. In Python (the CPython 2.6.4)
>>> 1 is 1
True
>>> 1 is 3-2
True
>>> a = 1
>>> b = 1
>>> a is b
True
>>> 12345 is 12345
True
>>> 12345 is 12346 - 1
False
>>> a = 12345
>>> b = 12345
>>> a is b
False
- Robert
--
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