[pypy-svn] r10814 - pypy/dist/pypy/annotation
pedronis at codespeak.net
pedronis at codespeak.net
Mon Apr 18 15:55:19 CEST 2005
Author: pedronis
Date: Mon Apr 18 15:55:19 2005
New Revision: 10814
Modified:
pypy/dist/pypy/annotation/bookkeeper.py
Log:
take care of py.lib str subclasses
Modified: pypy/dist/pypy/annotation/bookkeeper.py
==============================================================================
--- pypy/dist/pypy/annotation/bookkeeper.py (original)
+++ pypy/dist/pypy/annotation/bookkeeper.py Mon Apr 18 15:55:19 2005
@@ -133,7 +133,7 @@
result = SomeInteger(nonneg = x>=0)
elif tp is r_uint:
result = SomeInteger(nonneg = True, unsigned = True)
- elif tp is str:
+ elif issubclass(tp, str): # py.lib uses annotated str subclasses
result = SomeString()
elif tp is tuple:
result = SomeTuple(items = [self.immutablevalue(e) for e in x])
@@ -216,7 +216,7 @@
return SomeInteger()
elif t is r_uint:
return SomeInteger(nonneg = True, unsigned = True)
- elif t is str:
+ elif issubclass(t, str): # py.lib uses annotated str subclasses
return SomeString()
elif t is float:
return SomeFloat()
More information about the Pypy-commit
mailing list