In #7928 due to the fact that the default python waring filter
displays warnings only once a comment on this behaviour is added and
that's it.
I would like to reinitiate a discussion on this, arguing that Sage
should define its own warning classes.
Use case for example:
I have definied a = [-3, -4, -7]. Later I define a polynomial ring
PolynomialRing(QQ, ['a', 'b']). After a while I want to use these
monomials directly, so I call inject_vars(). A warning is raised since
I am overwriting a and b. Thats very good since now the iteration [D
in a] won't work. I'm now aware of this.
I continue working and a similar thing happens again. No exception is
raised this time and later on I try to iterate a. This won't work I
will have some trouble to find out, that I haven't chosen my variable
names cleverly once again.

In my opinion this is not user friendly. So we have should change the
filter of the warning raised in inject_variable . But we shouldn't do
it for the warning class RuntimeWarning, since using Groebner basis
over certain rings, users will get annoyed if we always display that
we are falling back to a toy implementation.

The solution could be to introduce a new file in which we care for
warnings. Namely, define several classes which inherit from the
standard ones and then set up the filters correctly.

Your opinions?

Bests, Martin
-- 
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

Reply via email to