Hi, > sage: sage: f1(x) = -1 > sage: sage: f2(x) = 2 > sage: sage: f = Piecewise([[(0,pi/2),f1],[(pi/2,pi),f2]]) > /home/novoselt/sage/src/bin/sage-ipython:1: DeprecationWarning: use > lower-case piecewise instead > See http://trac.sagemath.org/14801 for details. > #!/usr/bin/env python
Indeed that also works for me, and many other deprecation warnings. I should have tried that yesterday. I should explain that I'm working on a deprecation warning for the Matrix.I property. I'm baffled because the warning that I added seems to print sometimes and not other times. Consider for instance, the following code run in the Sage shell, after applying #20904: sage: identity_matrix(ZZ, 2).I <no warning> sage: def a(): sage: return identity_matrix(ZZ, 2).I sage: a() <prints a warning> This is the behaviour in the Sage shell and in Jupyter, while the Sage notebook prints a warning both times! I tried writing a small class with a property and deprecating that, but that works correctly for whatever reason. So I don't know if it could have anything to do with the matrix class being Cython or some other feature of it... Any work-around would be appreciated. Best, Johan -- 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 post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.