-
-
Notifications
You must be signed in to change notification settings - Fork 641
Description
The function call syntax for symbolic expressions has been deprecated for about 12 years. It is about time it raised some errors. This will prevent people from getting confused because of behavior like this.
See also the threads
- http://groups.google.com/group/sage-devel/t/de97f91d548cc0ec
- http://groups.google.com/group/sage-devel/t/5f2705b2b8d21593/b11079d8299a03b5
Update in 9.4.beta4: The deprecation warning introduced in #5930 was not issued in direct interactive use since Sage 8.4 (despite being doctested):
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.4.beta4, Release Date: 2021-07-01 │
│ Using Python 3.9.5. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable. ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage: var('y')
y
sage: a = x+y
sage: a(2, 3)
5
sage: warnings.resetwarnings()
sage: a(2, 3)
/Users/mkoeppe/s/sage/sage-rebasing/worktree-gcc11/local/lib/python3.9/site-packages/IPython/core/interactiveshell.py:3343: DeprecationWarning: Substitution using function-call syntax and unnamed arguments is deprecated and will be removed from a future release of Sage; you can use named arguments instead, like EXPR(x=..., y=...)
See http://trac.sagemath.org/5930 for details.
exec(code_obj, self.user_global_ns, self.user_ns)
5
(fixed in #32139)
Follow-up: #32227 Deprecate methods arguments
(alias: args
), number_of_arguments
, _fast_callable_
for non-callable symbolic expressions
CC: @nthiery @kini @DaveWitteMorris @nbruin @egourgoulhon
Component: symbolics
Author: Punarbasu Purkayastha, Matthias Koeppe
Branch/Commit: 9891a51
Reviewer: Matthias Koeppe, Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/14270