[pypy-svn] r75162 - pypy/trunk/pypy/module/imp

arigo at codespeak.net arigo at codespeak.net
Mon Jun 7 10:28:12 CEST 2010


Author: arigo
Date: Mon Jun  7 10:28:10 2010
New Revision: 75162

Modified:
   pypy/trunk/pypy/module/imp/importing.py
Log:
No-op changes: uses "< 0" instead of "== -1", which allows
the annotation-time asserts to be removed.


Modified: pypy/trunk/pypy/module/imp/importing.py
==============================================================================
--- pypy/trunk/pypy/module/imp/importing.py	(original)
+++ pypy/trunk/pypy/module/imp/importing.py	Mon Jun  7 10:28:10 2010
@@ -178,13 +178,11 @@
     else:
         level = 0
         first = None
-        while last_dot != -1:
-            assert last_dot >= 0 # bah
+        while last_dot >= 0:
             last_dot = modulename.find('.', last_dot + 1)
-            if last_dot == -1:
+            if last_dot < 0:
                 w_mod = check_sys_modules_w(space, modulename)
             else:
-                assert last_dot >= 0
                 w_mod = check_sys_modules_w(space, modulename[:last_dot])
             if w_mod is None or space.is_w(w_mod, space.w_None):
                 return None



More information about the Pypy-commit mailing list