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: ast branch changed interactive module name
Type: Stage:
Components: Interpreter Core Versions: Python 2.5
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: collinwinter, exarkun
Priority: normal Keywords: patch

Created on 2006-06-25 04:51 by exarkun, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
default-module.patch exarkun, 2006-06-25 04:53 Change module name back to "?"
Messages (2)
msg50528 - (view) Author: Jean-Paul Calderone (exarkun) * (Python committer) Date: 2006-06-25 04:51
Python 2.4 displays tracebacks interactively like this:

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ZeroDivisionError: integer division or modulo by zero

Python 2.5b1 displays them like this:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ZeroDivisionError: integer division or modulo by zero

This doesn't seem likely a particularly good change and
it breaks tests which rely on the particular spelling
of this message.  I probably wouldn't mind the change
if it were to a more useful string than "<module>", but
"?" seemed better than the current state.  If anything
is /not/ a module, it's an interactive session with the
interpreter.
msg50529 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2007-03-08 18:19
1) An interpreter session is essentially a module that the user types in, one statement at a time.

2) "?" tells me considerably less about where the error occurred than does "<module>". "?" could mean anything.

3) Since Python 2.5 has already been released with the objected-to behavior, I'd say it's incredibly unlikely that this change will be reverted.
History
Date User Action Args
2022-04-11 14:56:18adminsetgithub: 43548
2006-06-25 04:51:52exarkuncreate