Changes between Initial Version and Version 1 of Ticket #17953


Ignore:
Timestamp:
03/14/15 15:13:42 (6 years ago)
Author:
rws
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #17953

    • Property Summary changed from inconsistency in returned type of symbolic function result to inconsistency in returned type of BuiltinFunction result
  • Ticket #17953 – Description

    initial v1  
    1212but this is not:
    1313{{{
    14 sage: lambert_w(SR(0)).parent()
    15 Integer Ring
     14from sage.symbolic.function import BuiltinFunction
     15
     16class TestFunction(BuiltinFunction):
     17    def __init__(self):
     18        BuiltinFunction.__init__(self, "testfun", nargs=2)
     19    def _eval_(self, n, x, *args, **kwds):
     20        print (parent(n), parent(x))
     21        return SR(5)
     22
     23sage: TestFunction()(SR(1),GF(2)(1))
     24(Integer Ring, Finite Field of size 2)
     255
     26sage: type(_)
     27<type 'int'>
    1628}}}
    17 
    18 This ticket serves as a catch-all for such unexpected types.
     29An explanation could be that `factorial` and `exp` derive from `GinacFunction`.