[pypy-svn] r25277 - pypy/dist/pypy/annotation
tismer at codespeak.net
tismer at codespeak.net
Tue Apr 4 02:57:22 CEST 2006
Author: tismer
Date: Tue Apr 4 02:57:20 2006
New Revision: 25277
Modified:
pypy/dist/pypy/annotation/bookkeeper.py
Log:
support more SomeObjects, without breaking anything (I hope, since there were lots of broken tests when I checked in)
Modified: pypy/dist/pypy/annotation/bookkeeper.py
==============================================================================
--- pypy/dist/pypy/annotation/bookkeeper.py (original)
+++ pypy/dist/pypy/annotation/bookkeeper.py Tue Apr 4 02:57:20 2006
@@ -390,13 +390,13 @@
if result is None:
result = SomeObject()
else:
- try:
+ # note that the print support functions are __builtin__
+ if hasattr(x, '__module__') and x.__module__ != '__builtin__' \
+ or tp in (types.FunctionType, types.MethodType):
result = SomePBC([self.getdesc(x)])
- except AssertionError, e:
- if not self.annotator.policy.allow_someobjects:
- raise
+ else:
+ # a builtin that we don't handle specially
result = SomeObject()
-
elif hasattr(x, '__class__') \
and x.__class__.__module__ != '__builtin__':
# user-defined classes can define a method _freeze_(), which
More information about the Pypy-commit
mailing list