A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-April/088048.html below:

[Python-Dev] PyDict_SetItem hook

[Python-Dev] PyDict_SetItem hook [Python-Dev] PyDict_SetItem hookJohn Ehresman jpe at wingware.com
Thu Apr 2 01:29:20 CEST 2009
I've written a proof of concept patch to add a hook to PyDict_SetItem at 
  http://bugs.python.org/issue5654  My motivation is to enable 
watchpoints in a python debugger that are called when an attribute or 
global changes.  I know that this won't cover function locals and 
objects with slots (as Martin pointed out).

We talked about this at the sprints and a few issues came up:

* Is this worth it for debugger watchpoint support?  This is a feature 
that probably wouldn't be used regularly but is extremely useful in some 
situations.

* Would it be better to create a namespace dict subclass of dict, use it 
for modules, classes, & instances, and only allow watches of the 
subclass instances?

* To what extent should non-debugger code use the hook?  At one end of 
the spectrum, the hook could be made readily available for non-debug use 
and at the other end, it could be documented as being debug only, 
disabled in python -O, & not exposed in the stdlib to python code.

John
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4