Hello everyone, 
I have encountered some inconsistencies in the code involving rings. Some 
implementations use 

R.is_field()

To check whether a ring R is a ring whereas other implementations prefer

R in Fields()

I propose to unify this behavior. A first approach and discussion can be 
found here: https://trac.sagemath.org/ticket/31722.

The point is that not all rings inherit from rings/ring.pyx where the 
method is_field is originated, why invoking it sometimes causes an error. I 
can imagine that is_field is even slightly faster than checking the 
category. Because of that suggest to add this method (among 
is_integral_domain) permanently to categories/rings.py.

This is also a great opportunity to get rid of snippets like

_Fields = Fields()

all over Sage that unnecessarily clutter the memory. Instead we can either 
use is_field

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/95f3a294-3840-44db-aa07-ff1d6e37eb65n%40googlegroups.com.

Reply via email to