[pypy-svn] r14356 - pypy/dist/pypy/objspace/std

arigo at codespeak.net arigo at codespeak.net
Wed Jul 6 20:28:04 CEST 2005


Author: arigo
Date: Wed Jul  6 20:28:02 2005
New Revision: 14356

Modified:
   pypy/dist/pypy/objspace/std/longtype.py
Log:
Annotator-guiding assert.  This shows a real bug, btw.
XXX find a way to extract digits out of a long independently of its
    concrete W_XxxObject class!


Modified: pypy/dist/pypy/objspace/std/longtype.py
==============================================================================
--- pypy/dist/pypy/objspace/std/longtype.py	(original)
+++ pypy/dist/pypy/objspace/std/longtype.py	Wed Jul  6 20:28:02 2005
@@ -32,6 +32,8 @@
             if space.is_true(space.is_(w_longtype, space.w_long)):
                 return w_obj
             if space.is_true(space.isinstance(w_obj, space.w_long)):
+                assert isinstance(w_obj, W_LongObject)  # XXX this could fail!
+                # XXX find a way to do that even if w_obj is not a W_LongObject
                 w_value = w_obj
             elif space.is_true(space.isinstance(w_obj, space.w_int)):
                 intval = space.int_w(w_obj)



More information about the Pypy-commit mailing list