[pypy-svn] r51202 - pypy/dist/pypy/rpython
xoraxax at codespeak.net
xoraxax at codespeak.net
Sat Feb 2 12:58:44 CET 2008
Author: xoraxax
Date: Sat Feb 2 12:58:44 2008
New Revision: 51202
Modified:
pypy/dist/pypy/rpython/rpbc.py
Log:
Remove confusing getattr test (which does not really make any sense IMHO) in the rpbc code that generates the Desc warning.
Modified: pypy/dist/pypy/rpython/rpbc.py
==============================================================================
--- pypy/dist/pypy/rpython/rpbc.py (original)
+++ pypy/dist/pypy/rpython/rpbc.py Sat Feb 2 12:58:44 2008
@@ -14,6 +14,7 @@
from pypy.rpython import callparse
+
def small_cand(rtyper, s_pbc):
if 1 < len(s_pbc.descriptions) < rtyper.getconfig().translation.withsmallfuncsets and \
hasattr(rtyper.type_system.rpbc, 'SmallFunctionSetPBCRepr'):
@@ -482,10 +483,7 @@
try:
thisattrvalue = frozendesc.attrcache[attr]
except KeyError:
- # don't issue warning if this attribute can be read, but
- # is not used
- if not hasattr(frozendesc.pyobj, attr):
- warning("Desc %r has no attribute %r" % (frozendesc, attr))
+ warning("Desc %r has no attribute %r" % (frozendesc, attr))
continue
llvalue = r_value.convert_const(thisattrvalue)
setattr(result, mangled_name, llvalue)
More information about the Pypy-commit
mailing list