Unterschiede in pdb zwischen Python 2.3 und 2.4

Hallo, eben habe ich etwas muehsam herausgefunden, dass es mindestens einen interessanten Unterschied im Python-Debugger zwischen den Versionen 2.3 und 2.4 gibt. (Wichtig im Beispiel unten ist, dass es aus nur einer Zeile besteht, und dass nach dem Doppelpunkt keine neue Programmzeile kommt.) Allerdings scheint der Fehler nicht in pdb.py, sondern irgendwo anders zu liegen, da eine 2.4-Kopie davon unter Python 2.3 allein noch keine Verbesserung bringt... Genau kann ich es jetzt nicht herausfinden. Vielleicht weiss jemand, ob das irgendwo dokumentiert ist? Auf die Schnelle habe ich nichts dergleichen in den Python Release Notes finden können... Gruss, Dinu Beispiel: Python 2.3 (#1, Sep 13 2003, 00:49:11) [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> >>> import pdb >>> pdb.run("for j in [1, 2, 3]: print j") > <string>(1)?() (Pdb) s > <string>(1)?() (Pdb) s 1 2 3 --Return-- > <string>(1)?()->None (Pdb) >>> Python 2.4 (#1, Feb 7 2005, 21:41:21) [GCC 3.3 20030304 (Apple Computer, Inc. build 1640)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import pdb >>> pdb.run("for j in [1, 2, 3]: print j") > <string>(1)?() (Pdb) s > <string>(1)?() (Pdb) s 1 > <string>(1)?() (Pdb) s 2 > <string>(1)?() (Pdb) s 3 > <string>(1)?() (Pdb) s --Return-- > <string>(1)?()->None (Pdb) >>> _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de

Dinu Gherman wrote:
Vielleicht weiss jemand, ob das irgendwo dokumentiert ist? Auf die Schnelle habe ich nichts dergleichen in den Python Release Notes finden können...
Ich glaube, es ist das hier (aus Misc/NEWS bzw. Misc/HISTORY): - SET_LINENO is gone. co_lnotab is now consulted to determine when to call the trace function. C code that accessed f_lineno should call PyCode_Addr2Line instead (f_lineno is still there, but only kept up to date when there is a trace function set). Früher hat der Debugger bei Ausführung von SET_LINENO angehalten, jetzt gibt es SET_LINENO nicht mehr. Ciao, Martin _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de
participants (2)
-
"Martin v. Löwis"
-
Dinu Gherman