Updates:
        Cc: ronan.l...@gmail.com

Comment #9 on issue 1233 by asmeurer: fix the rest of jython bugs
http://code.google.com/p/sympy/issues/detail?id=1233

Nowadays, if you try to import sympy in Jython, you get:

Traceback (most recent call last):
  File "./bin/test", line 17, in <module>
    from sympy.utilities.runtests import test
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/__init__.py", line 30, in <module>
    from sympy.core import *
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/__init__.py", line 8, in <module>
    from expr import Expr, AtomicExpr
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/expr.py", line 1826, in <module>
    class AtomicExpr(Atom, Expr):
TypeError: Error when calling the metaclass bases
    multiple bases have instance lay-out conflict

I bisected this to the commit:

commit 0362747e5f433f904dc446a0e3032503b7aa3fe3
Author: Ronan Lamy <ronan.l...@normalesup.org>
Date:   Tue Apr 6 04:30:49 2010 +0100

    add __slots__

diff --git a/sympy/core/basic.py b/sympy/core/basic.py
index 4758270..43e8373 100644
--- a/sympy/core/basic.py
+++ b/sympy/core/basic.py
@@ -1622,6 +1622,9 @@ def __call__(self, subsdict):

 class EvalfMixin(object):
     """Mixin class adding evalf capabililty."""
+
+    __slots__ = []
+
     def _evalf(self, prec):
"""Helper for evalf. Does the same thing but takes binary precision"""
         r = self._eval_evalf(prec)
@@ -1662,6 +1665,8 @@ def _to_mpmath(self, prec, allow_ints=True):
         return mpmath.make_mpc((re, im))

 class Expr(Basic, EvalfMixin):
+    __slots__ = []
+
     def __float__(self):
         result = self.evalf()
         if result.is_Number:


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

Reply via email to