From: Leo U. <leo...@ya...> - 2006-12-21 22:38:53
|
Hi, I experienced this bug: http://sourceforge.net/tracker/index.php?func=detail&aid=1230210&group_id=12867&atid=112867 [ 1230210 ] isinstance(2.0, float) fails with jikes with javac and a modified jython. What is occuring is that in the process of producing a PyType for PyFloat a static initializer is executed, causing another PyFloat/PyType to be created just before the other one has an opportunity to be created and cached. The problem I saw was: __builtin__ classDictInit creates a bunch of PyType instances via PyType.fromClass. But PyFloat also does this with a static field: private static final PyType FLOATTYPE = PyType.fromClass(PyFloat.class); hence the call from __builtin__ causes PyFloat to initialized its FLOATTYPE field while it is in the process of creating a PyType for PyFloat. This results in multiple PyTypes floating around for PyFloat. This does not appear to be a unique possibility for PyFloat. PyLong, PyInteger, PyString and who knows where else this pattern appears. leouser __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |