Changes between Version 4 and Version 5 of Ticket #17547
- Timestamp:
- 07/09/15 08:33:09 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #17547
-
Property
Summary
changed from
BuiltinFunction overriding GiNaC function is allowed
toBuiltinFunction overriding GiNaC function
-
Property
Summary
changed from
-
Ticket #17547 – Description
v4 v5 1 The attempt to create a symbolic function that prints with a name that is also used by a reserved GiNaC function results in unexpected behaviour when evaluating. The following should output `x^2` but completely bypasses `AFunction.eval`: 1 2 {{{ 2 3 sage: from sage.symbolic.function import BuiltinFunction … … 11 12 e^x 12 13 }}} 13 If the name is e.g. `p2` `AFunction.eval` gets called, but not with name equal to a function provided with GiNaC. Compare the above with14 If the name is however e.g. `p2` then `AFunction.eval` gets called as expected. Compare the above with 14 15 {{{ 15 16 ... … … 18 19 x^2 19 20 }}} 20 The attempt at creation should give an error (plus respective documentation warnings). 21 22 Alternatively, search first for user-defined function names, then GiNaC core, to allow overriding. 21 This prevents creation of `BuiltinFunction`s as wrapper for functions reserved by Pynac with the same name like `factorial` (#17489), and forces every change into Pynac.