Changes between Initial Version and Version 1 of Ticket #9706, comment 72
- Timestamp:
- 12/05/13 08:46:37 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #9706, comment 72
initial v1 1 1 I think that `chebyshev_T(1/2, 2)` should raise a `ValueError` (or can we make sense of this?). So, in your code there should really be 3 cases: integer, symbolic and "something else" which is always an error. 2 2 3 Also: the code block you wrote above is a good example of something would could fit in the generic `SymbolicPolynomial` (or `OrthogonalPolynomial` if you like) class. So I wouldn't use `super ` but simply a different method like `_eval_symbolic()`.3 Also: the code block you wrote above is a good example of something would could fit in the generic `SymbolicPolynomial` (or `OrthogonalPolynomial` if you like) class. So I wouldn't use `super(OrthogonalPolynomial,self)` but `super(BuiltinFunction, self)`. 4 4 5 5 So, I would do something like … … 7 7 def __call__(self,n,x): 8 8 if is_Expression(n): 9 return s elf._eval_symbolic(n,x)9 return super(BuiltinFunction, self).__call__(n,x) 10 10 # We consider the polynomial really as a polynomial, 11 11 # not a symbolic expression.