[pypy-svn] r37233 - pypy/dist/pypy/annotation
arigo at codespeak.net
arigo at codespeak.net
Tue Jan 23 22:01:11 CET 2007
Author: arigo
Date: Tue Jan 23 22:01:10 2007
New Revision: 37233
Modified:
pypy/dist/pypy/annotation/unaryop.py
Log:
Oups! A bogus bug fix for something that wasn't buggy.
Modified: pypy/dist/pypy/annotation/unaryop.py
==============================================================================
--- pypy/dist/pypy/annotation/unaryop.py (original)
+++ pypy/dist/pypy/annotation/unaryop.py Tue Jan 23 22:01:10 2007
@@ -525,17 +525,13 @@
if isinstance(s_result, SomePBC):
s_result = ins.classdef.lookup_filter(s_result, attr)
elif isinstance(s_result, SomeImpossibleValue):
- if ins.classdef.check_missing_attribute_update(attr):
- attrdef = ins.classdef.find_attribute(attr)
- attrdef.read_locations[position] = True
- s_result = attrdef.getvalue()
+ ins.classdef.check_missing_attribute_update(attr)
# blocking is harmless if the attribute is explicitly listed
# in the class or a parent class.
- if isinstance(s_result, SomeImpossibleValue):
- for basedef in ins.classdef.getmro():
- if basedef.classdesc.allslots is not None:
- if attr in basedef.classdesc.allslots:
- raise HarmlesslyBlocked("getattr on a slot")
+ for basedef in ins.classdef.getmro():
+ if basedef.classdesc.allslots is not None:
+ if attr in basedef.classdesc.allslots:
+ raise HarmlesslyBlocked("getattr on a slot")
return s_result
return SomeObject()
getattr.can_only_throw = []
More information about the Pypy-commit
mailing list