Right now, the following works:

sage: a=(x+y)
sage: a.arguments()
(x, y)

However, we deprecated the following a long time ago:

sage: a(1,2)
/Users/grout/sage/local/lib/python2.6/site-packages/IPython/iplib.py:2073: 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=...)
  exec code_obj in self.user_global_ns, self.user_ns
3

I propose that a.arguments() should return a deprecation warning:

sage: a.arguments()
/Users/grout/sage/local/lib/python2.6/site-packages/IPython/iplib.py:2073: DeprecationWarning: (Since Sage version 4.4.2) symbolic expressions do not have default callable arguments. Please use the variables() method
  exec code_obj in self.user_global_ns, self.user_ns
(x, y)

This will impact other things as well, since apparently things have been using .arguments() when they should have been using .variables(). I can post a patch for this. Here, I'm just calling for comment, especially from those that think this will mess everything up in some way.

Note that callable functions will still have sensible return values:

sage: f(x,y)=x+y
sage: f.arguments()
(x, y)


Thanks,

Jason



--
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