Issue 1154: Don't do any calculation at import time
http://code.google.com/p/sympy/issues/detail?id=1154

New issue report by ondrej.certik:
This is bad, because it slows down "import sympy" and also makes debugging
difficult, as sympy is not yet fully loaded, mainly printing doesn't work
in Mul.flatten because of that.

The following patch "fixes" that. So we need to figure out some way to do
the same thing, but not at import time, but only when it's actually needed.


diff --git a/sympy/functions/special/polynomials.py
b/sympy/functions/special/polynomials.py
index eda626c..e595fa2 100644
--- a/sympy/functions/special/polynomials.py
+++ b/sympy/functions/special/polynomials.py
@@ -83,7 +83,7 @@ class chebyshevt(PolynomialSequence):
      Chebyshev polynomial of the first kind, T_n(x)
      """
      @staticmethod
-    @recurrence_memo([S.One, _x])
+    [EMAIL PROTECTED]([S.One, _x])
      def calc(n, prev):
          return (2*_x*prev[n-1] - prev[n-2]).expand()

@@ -107,7 +107,7 @@ class chebyshevu(PolynomialSequence):
          (-1) + 4*x**2
      """
      @staticmethod
-    @recurrence_memo([S.One, 2*_x])
+    [EMAIL PROTECTED]([S.One, 2*_x])
      def calc(n, prev):
          return (2*_x*prev[n-1] - prev[n-2]).expand()

@@ -184,7 +184,7 @@ class legendre(PolynomialSequence):
      * http://en.wikipedia.org/wiki/Legendre_polynomial
      """
      @staticmethod
-    @recurrence_memo([S.One, _x])
+    [EMAIL PROTECTED]([S.One, _x])
      def calc(n, prev):
          return (((2*n-1)*_x*prev[n-1] - (n-1)*prev[n-2])/n).expand()

@@ -277,6 +277,6 @@ class hermite(PolynomialSequence):
      * http://mathworld.wolfram.com/HermitePolynomial.html
      """
      @staticmethod
-    @recurrence_memo([S.One, 2*_x])
+    [EMAIL PROTECTED]([S.One, 2*_x])
      def calc(n, prev):
          return (2*_x*prev[n-1]-2*(n-1)*prev[n-2]).expand()


Issue attributes:
        Status: Accepted
        Owner: ----
        Labels: Type-Defect Priority-Medium

-- 
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to