New submission from Mitchell Model <m...@acm.org>: Near the bottom of the library documentation for pdb there is an example of a very useful alias:
alias pi for k in %1.__dict__.keys(): print("%1.",k,"=",%1.__dict__[k]) It turns out that doing print in a for loop in pdb results in None being printed on a line after each print. For example: (Pdb) for n in range(3): print(n) 0 None 1 None 2 None (Pdb) Seems like a (minor) bug, but if not, the example should be removed or replaced in the documentation. ---------- assignee: georg.brandl components: Documentation, Library (Lib) messages: 92588 nosy: MLModel, georg.brandl severity: normal status: open title: pdb - print in for iteration prints None after printing versions: Python 3.0, Python 3.1, Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6903> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com