Hi there,

when trying to use pdb, I spotted some kind of annoying behaviour of pdb:
for pdb.pm, it still uses sys.last_traceback which is set by code.py

This renders the function unusable in non-interactive contexts ... I suggest
to change pdb.pm to use sys.exc_traceback instead. Any reasons not to do
so?

For Py3k, it might make sense to kill it.

Besides that, some other places in the stdlib reference this attr as well:

idle in 5 places
./lib-tk/Tkinter.py:        sys.last_traceback = tb
./traceback.py:    sys.last_value, sys.last_traceback, limit, file)'."""
./traceback.py:    print_exception(sys.last_type, sys.last_value,
sys.last_traceback,
./pdb.py:    post_mortem(sys.last_traceback)
./code.py:        type, value, sys.last_traceback = sys.exc_info()
./code.py:            sys.last_traceback = tb
./dis.py:            tb = sys.last_traceback

Kind regards,
Alexander

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to