[pypy-svn] r12576 - pypy/dist/pypy/annotation

pedronis at codespeak.net pedronis at codespeak.net
Thu May 19 21:37:08 CEST 2005


Author: pedronis
Date: Thu May 19 21:37:08 2005
New Revision: 12576

Modified:
   pypy/dist/pypy/annotation/bookkeeper.py
Log:
special-case sys constants



Modified: pypy/dist/pypy/annotation/bookkeeper.py
==============================================================================
--- pypy/dist/pypy/annotation/bookkeeper.py	(original)
+++ pypy/dist/pypy/annotation/bookkeeper.py	Thu May 19 21:37:08 2005
@@ -3,6 +3,7 @@
 """
 
 from __future__ import generators
+import sys
 from types import FunctionType, ClassType, MethodType
 from types import BuiltinMethodType
 from pypy.tool.ansi_print import ansi_print
@@ -125,6 +126,8 @@
     def immutablevalue(self, x):
         """The most precise SomeValue instance that contains the
         immutable value x."""
+        if x is sys: # special case constant sys to someobject
+            return SomeObject()
         tp = type(x)
         if tp is bool:
             result = SomeBool()



More information about the Pypy-commit mailing list