[issue9756] Crash with custom __getattribute__

Andreas Stührk report at bugs.python.org
Fri Apr 29 18:01:11 CEST 2011


Andreas Stührk <andy-python at hammerhartes.de> added the comment:

I think it is reasonable to restrict the self argument of method descriptors and slot wrapper descriptors to real instances of the type. The called method can't cope with the value anyway (in the general case). Alternative Python implementations like Jython and PyPy already enforce this.

Attached is a patch against default branch that enforces this.

----------
keywords: +patch
Added file: http://bugs.python.org/file21834/issue9756.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9756>
_______________________________________


More information about the Python-bugs-list mailing list