-
-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deprecate substitution via __call__ w/ unnamed arguments #5413
Comments
comment:1
Two trivial doctest failures:
Cheers, Michael |
comment:3
Attachment: deprecate-symbolic-unnamed-call.patch.gz Oops, forgot to doctest the documentation. I've replaced my original patch with a new one that also fixes these two doctest failures. |
comment:4
This is an (email) reminder to myself to review this to get it in. |
comment:5
This ticket probably also affects #5093. |
comment:6
Thanks for working on this Carl. I only read the patch, didn't test it yet. Explicitly having to use .function() in two places bothers me:
Perhaps we should modify these to handle non function arguments more gracefully after this change. I understand that this might require a new syntax to construct Piecewise objects. One option is to add a new parameter, which includes an ordered list of variables. E.g.,
or
Comments? |
comment:7
The above comment for Piecewise would probably also apply to symbolic matrices and vectors, right? (well, at least, as soon as symbolic vectors are callable, anyway). I think that Burcin's proposal is okay, but doesn't extend very well to matrices and vectors, since I'd hate to mess up the standard matrix/vector constructors. I'm don't know a better way to extend this to matrices and vectors, though. Maybe we ought to just deprecate calling a symbolic matrix without keyword arguments, and just implement the callable symbolic vector with the same restrictions. |
comment:8
The patch already does deprecate calling a symbolic matrix without keyword arguments. |
comment:9
Yes. I thought Burcin's comment was about a syntax to avoid the .function() call. That's what I was commenting on. |
comment:10
After discussions on IRC and sage-devel (http://groups.google.com/group/sage-devel/browse_thread/thread/97cdf80edb089481/73e8e6659c09e1d9#73e8e6659c09e1d9) we've decided on a much more extensive deprecation scheme. So it's not worth reviewing the current patch. (I should have a new patch within a few days.) |
comment:11
Attachment: trac5413-deprecate-symbolic-unnamed-call.patch.gz I've posted a patch that implements the more extensive deprecation described here: http://groups.google.com/group/sage-devel/browse_thread/thread/97cdf80edb089481# The patch now depends on #5093. Apply only the second patch. |
comment:12
This is really odd:
|
comment:13
Jason, I get the same behavior without Carl's patch on Sage-3.4. I suggest moving that to a separate ticket. We could also argue if that is valid syntax there. I give a positive review to this. It would be good to get this in an alpha and let more people play with it. Thanks again Carl. Cheers, |
comment:14
comment:12 is now #5607. |
comment:15
I agree that we should get this into the alpha so it gets wider exposure. (providing doctests pass) positive review from me too. |
comment:16
There is one tiny doctest issue left - at least in my merge tree :)
I am fixing this with a reviewer patch. Cheers, Michael |
Attachment: trac_5413-reviewer.patch.gz |
comment:17
Merged trac5413-deprecate-symbolic-unnamed-call.patch and trac_5413-reviewer.patch in Sage 3.4.1.alpha0. Cheers, Michael |
As discussed on sage-devel here: http://groups.google.com/group/sage-devel/browse_thread/thread/b1a03f8fc8ae8fcd/553773d7ba600ae7#553773d7ba600ae7
I added deprecation warnings to the four affected
__call__
functions (two for symbolic values, one for equations, one for matrices), and fixed almost all the warnings in all the doctests other than the doctests specifically for those__call__
methods.There's one set of warnings that I didn't figure out how to fix (in piecewise.py), so I just added the warning to the expected output for now.
CC: @jasongrout
Component: calculus
Issue created by migration from https://trac.sagemath.org/ticket/5413
The text was updated successfully, but these errors were encountered: