[pypy-svn] r10867 - pypy/dist/pypy/annotation
pedronis at codespeak.net
pedronis at codespeak.net
Tue Apr 19 20:17:20 CEST 2005
Author: pedronis
Date: Tue Apr 19 20:17:20 2005
New Revision: 10867
Modified:
pypy/dist/pypy/annotation/unaryop.py
Log:
annotations for list.index, str.endswith/startswith
Modified: pypy/dist/pypy/annotation/unaryop.py
==============================================================================
--- pypy/dist/pypy/annotation/unaryop.py (original)
+++ pypy/dist/pypy/annotation/unaryop.py Tue Apr 19 20:17:20 2005
@@ -198,6 +198,9 @@
def method_pop(lst, s_index=None):
return lst.listdef.read_item()
+ def method_index(lst, el):
+ return SomeInteger(nonneg=True)
+
def len(lst):
s_item = lst.listdef.read_item()
if isinstance(s_item, SomeImpossibleValue):
@@ -243,6 +246,12 @@
class __extend__(SomeString):
+ def method_startswith(str, frag):
+ return SomeBool()
+
+ def method_endswith(str, frag):
+ return SomeBool()
+
def method_join(str, s_list):
return SomeString()
More information about the Pypy-commit
mailing list