Michael Foord <mich...@voidspace.org.uk> added the comment:

Further updated implementation. Now handles data descriptors correctly but 
removes the code that resolves the builtin descriptors (calling __get__ on slot 
and attribute descriptors).

As it was resolving some descriptors but not all, and resolving getset 
descriptors could still trigger execution in C extensions, Benjamin felt it was 
more consistent and cleaner to return descriptor objects rather than resolving 
them. As a bonus it makes the code shorter too.

I would add to the documentation some example code showing how to handle the 
descriptor if the user wants to resolve them herself. (Example code shown in 
the tests.)

The only remaining cases that are handled incorrectly are pathological ones. 
(See the notes in the tests.)

----------
Added file: http://bugs.python.org/file19489/static.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9732>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to