Changes between Initial Version and Version 2 of Ticket #22401


Ignore:
Timestamp:
02/22/17 06:51:17 (5 years ago)
Author:
rws
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22401

    • Property Summary changed from Let substitute_function handle anon functions smoothly to Let substitute_function handle anon functions explicitly
  • Ticket #22401 – Description

    initial v2  
    1 `substitute_function` expects two function objects as argument not expressions (`f(x)`). This leads to the unexpected:
     1`substitute_function` expects two function objects as argument not expressions (`f(x)`). This leads to the (to some users) unexpected:
    22{{{
    33sage: f = function('f')(x)
     
    2626D[0](g)(1)
    2727}}}
    28 The ticket should make `substitute_function` do this automatically and ignore any arguments. Note that the mess results from `function` returning `f(x)` and users assigning this to `f` or `f(x)` instead of just doing
     28The ticket should make `substitute_function` raise an exception with a hint. Note that the mess results from `function('f')` returning a function object but `function('f')(x)` returning `f(x)` and users assigning this to `f` or `f(x)` instead of just doing
    2929{{{
    30 sage: function('f')(x)
    31 f(x)
     30sage: f=function('f')
    3231sage: f(1).substitute_function(f,g)
    3332g(1)
    3433}}}
     34Documentation of `substitute_function` could be made more explicit as well.