This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author t184256
Recipients t184256
Date 2016-09-24.20:13:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1474748035.58.0.360622195645.issue28265@psf.upfronthosting.co.za>
In-reply-to
Content
I've managed to obtain several objects, which __getattribute__ cannot be applied to them.

Minimal non-working example (a more detailed one is attached):
b = abs.__class__
b.__getattribute__(b, 'x')

Proxying such objects turned out to be even harder that proxying everything else in Python (as if it wasn't already mindbogglingly hard).

As you can see, given that 'builtin_function_or_method' object you can obtain its __getattribute__, but you cannot apply it.

Tested with Python 3.5.2 and 3.6.0b1.

What's the deal with that broken __getattribute__? It seems to be specific to 'builtin_function_or_method' class, but why is it broken? If it is "PyObject_GenericGetAttr", then why object.__getattribute__(b, 'x') works? What am I missing?
History
Date User Action Args
2016-09-24 20:13:55t184256setrecipients: + t184256
2016-09-24 20:13:55t184256setmessageid: <1474748035.58.0.360622195645.issue28265@psf.upfronthosting.co.za>
2016-09-24 20:13:55t184256linkissue28265 messages
2016-09-24 20:13:55t184256create