Simon King wrote:

> If one really wants to know whether R is provably not a field, then
> one asks R.is_field()==False.


A short aside unrelated to the general discussion, but good to know: 
it's usually much faster to do "some_value is False", since that is a 
pointer comparison.  Also, 0==False is true, where I don't think that's 
what you want in the above test.

sage: %timeit None==False
1000000 loops, best of 3: 264 ns per loop
sage: %timeit None is False
10000000 loops, best of 3: 171 ns per loop
sage: a=3
sage: %timeit a==False
100000 loops, best of 3: 2.82 µs per loop
sage: %timeit a is False
10000000 loops, best of 3: 211 ns per loop
sage: 0==False
True
sage: 0 is False
False



Jason


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to