Author: Alex Gaynor <alex.gay...@gmail.com> Branch: Changeset: r45244:7481ef60be9f Date: 2011-07-01 12:22 -0700 http://bitbucket.org/pypy/pypy/changeset/7481ef60be9f/
Log: Rollback adding __objclass__ to method, it had incorrect semantics. diff --git a/pypy/interpreter/test/test_typedef.py b/pypy/interpreter/test/test_typedef.py --- a/pypy/interpreter/test/test_typedef.py +++ b/pypy/interpreter/test/test_typedef.py @@ -16,7 +16,7 @@ def g(): f() - + try: g() except: @@ -214,15 +214,6 @@ bm = A().m assert bm.__func__ is bm.im_func assert bm.__self__ is bm.im_self - assert bm.im_class is A - if '__pypy__' in sys.builtin_module_names: - assert bm.__objclass__ is A assert bm.__doc__ == "aaa" assert bm.x == 3 raises(AttributeError, setattr, bm, 'x', 15) - l = [] - assert l.append.__self__ is l - if '__pypy__' in sys.builtin_module_names: - assert l.append.__objclass__ is list - assert l.__add__.__self__ is l - assert l.__add__.__objclass__ is list diff --git a/pypy/interpreter/typedef.py b/pypy/interpreter/typedef.py --- a/pypy/interpreter/typedef.py +++ b/pypy/interpreter/typedef.py @@ -771,7 +771,6 @@ im_self = interp_attrproperty_w('w_instance', cls=Method), __self__ = interp_attrproperty_w('w_instance', cls=Method), im_class = interp_attrproperty_w('w_class', cls=Method), - __objclass__ = interp_attrproperty_w('w_class', cls=Method), __getattribute__ = interp2app(Method.descr_method_getattribute), __eq__ = interp2app(Method.descr_method_eq), __ne__ = descr_generic_ne, _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit