This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Docs for pdb should note that __future__ magic doesn't work
Type: enhancement Stage:
Components: Documentation Versions: Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Martin Jones, docs@python
Priority: normal Keywords:

Created on 2016-05-11 10:40 by Martin Jones, last changed 2022-04-11 14:58 by admin.

Messages (1)
msg265300 - (view) Author: Martin Jones (Martin Jones) Date: 2016-05-11 10:40
when debugging a program at the pdb prompt, attempting to import from the __future__ module appears successful, but actually doesn't work:

(Pdb) from __future__ import division
(Pdb) 2/3
0

This leads to inconsistencies between statements evaluated on the pdb prompt and those evaluated in the program, which can hamper debugging. It would be good to have a note added to the 2.7 documentation for pdb along the lines of:

Note: importing from the __future__ module does not work under pdb.
History
Date User Action Args
2022-04-11 14:58:30adminsetgithub: 71184
2016-05-11 10:40:33Martin Jonescreate