[pypy-svn] r7343 - pypy/trunk/src/pypy/annotation
hpk at codespeak.net
hpk at codespeak.net
Wed Nov 17 17:57:24 CET 2004
Author: hpk
Date: Wed Nov 17 17:57:24 2004
New Revision: 7343
Modified:
pypy/trunk/src/pypy/annotation/builtin.py
Log:
the beginnings of filling caches and controling
it via "allowbuildcache" as a flag on an objectspace
Modified: pypy/trunk/src/pypy/annotation/builtin.py
==============================================================================
--- pypy/trunk/src/pypy/annotation/builtin.py (original)
+++ pypy/trunk/src/pypy/annotation/builtin.py Wed Nov 17 17:57:24 2004
@@ -3,6 +3,7 @@
"""
from pypy.annotation.model import SomeInteger, SomeObject, SomeChar, SomeBool
+from pypy.annotation.model import SomeTuple
from pypy.annotation.model import SomeString
from pypy.annotation.model import immutablevalue
from pypy.annotation.factory import ListFactory, getbookkeeper
@@ -46,6 +47,11 @@
s_obj, s_attr)
return s_obj.getattr(s_attr)
+def builtin_tuple(s_iterable):
+ if isinstance(s_iterable, SomeTuple):
+ return s_iterable
+ return SomeObject()
+
def builtin_type(s_obj, *moreargs):
if moreargs:
raise Exception, 'type() called with more than one argument'
More information about the Pypy-commit
mailing list