[PyQt] question about dip observe handler

Darren Dale dsdale24 at gmail.com
Sun Jul 18 23:11:15 BST 2010


I am reading the dip documentation at
http://www.riverbankcomputing.co.uk/static/Docs/dip/complete_example.html
, and have a question about the following:

"dip will invoke an observe() handler when the value of an attribute
is set, even if the new value is the same as the old one. We therefore
use the _propagate_changes attribute to prevent possible recursion
problems"

Why is it necessary to invoke the observe handler when the value of an
attribute does not change? There are quite a few infinite-recursion
workarounds in the example. If the possibility of infinite recursion
is so high, perhaps by default the handler should not be invoked if
the attribute value does not change, unless observe() was called with
a kwarg to invoke the handler regardless?

Darren


More information about the PyQt mailing list