Whining, not Dining
Dec 2005
/oss/python/permalink
Debugging Python

The tool to debug Python is pdb, think gdb for Python. It works, but it has warts.

The emacs integration is OK, but not great, the execution point glyph overwrites the first few columns of text. Breakpoints cannot be set on comments. Recoverable runtime errors cause it to bomb.

There’s an old fork for pdb to get ddd integration working, pydb. It basically doesn’t work. Setting breakpoints is very tricky. There’s no execution point glyph. Data structures don’t display.. which is why you use ddd in the first place. My plan is to get pydb working with ddd, then try to merge the pydb patches back upstream into pdb.

So many items added to the todo list..

Aug 2004
/oss/python/permalink
Last call optimization.

Lest Andrae’s python examples lead the gentle reader into thinking Python supports tail recursion optimization, it doesn’t. Guido doesn’t want it; it’s too schemey for him, he reckons it hides bugs, it’d make useful exceptions hard to come by, and it may well be very tricky to implement outside of C Python (Jython and Iron Python for example). Look for the “Proper tail recursion” thread on python-dev.