On 3 Apr, 2009, at 0:57, Guido van Rossum wrote:


The primary use case is some kind of trap on assignment. While this
cannot cover all cases, most non-local variables are stored in dicts.
List mutations are not in the same league, as use case.

I have a slightly different use-case than a debugger, although it boils down to "some kind of trap on assignment": implementing Key- Value Observing support for Python objects in PyObjC. "Key-Value Observing" is a technique in Cocoa where you can get callbacks when a property of an object changes and is something I cannot support for plain python objects at the moment due to lack of a callback mechanism. A full implementation would require hooks for mutation of lists and sets as well.

The lack of mutation hooks is not a terrible problem for PyObjC, we can always use Cocoa datastructures when using KVO, but it is somewhat annoying that Cocoa datastructures leak into code that could be pure python just because I want to use KVO.

Ronald


Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to