[pypy-svn] r9667 - pypy/dist/pypy/annotation
arigo at codespeak.net
arigo at codespeak.net
Sat Mar 5 17:44:11 CET 2005
Author: arigo
Date: Sat Mar 5 17:44:11 2005
New Revision: 9667
Modified:
pypy/dist/pypy/annotation/classdef.py
pypy/dist/pypy/annotation/unaryop.py
Log:
Fix confusing debugging helper
Modified: pypy/dist/pypy/annotation/classdef.py
==============================================================================
--- pypy/dist/pypy/annotation/classdef.py (original)
+++ pypy/dist/pypy/annotation/classdef.py Sat Mar 5 17:44:11 2005
@@ -77,7 +77,8 @@
if name.startswith('_') and not isinstance(value, FunctionType):
continue
if isinstance(value, FunctionType):
- value.class_ = cls # remember that this is really a method
+ if not hasattr(value, 'class_'):
+ value.class_ = cls # remember that this is really a method
self.add_source_for_attribute(name, sources.get(name, cls), self)
def add_source_for_attribute(self, attr, source, clsdef=None):
Modified: pypy/dist/pypy/annotation/unaryop.py
==============================================================================
--- pypy/dist/pypy/annotation/unaryop.py (original)
+++ pypy/dist/pypy/annotation/unaryop.py Sat Mar 5 17:44:11 2005
@@ -169,6 +169,7 @@
s_result = attrdef.getvalue()
# hack: if s_result is a set of methods, discard the ones
# that can't possibly apply to an instance of ins.classdef.
+ # XXX do it more nicely
if isinstance(s_result, SomePBC):
d = {}
for func, value in s_result.prebuiltinstances.items():
More information about the Pypy-commit
mailing list