New submission from Francisco Gracia:
The *File* option in the menu bar of both the Python shell and the program
editor have an entry called *Class Browser*.
If one selects it from the shell window, one gets always an error message with
the title: "No filename" which says: "This buffer has no associated filename".
This happens whatever the previous history of the current interactive session.
If one selects it from the editor window with a Python module loaded, then
another window shows correctly the expected information about the classes
defined in such a module, if any. The same previous error
appears if the current contents of the editor are not recognised as a Python
module (for instance by not having been yet saved), which is reasonable.
IDLE's help says:
"Class Browser -- Show classes and methods in current file".
This does not clarify things much (what does *current file* mean from the shell
window?) and does not permit one to get a coherent idea of the purpose
originally intended for the option (a module imported in
the current interactive session could not be rightly understood as a *current
file*?).
I find this situation quite confuse and would suggest that some action could be
taken in order to at least clarify it, if not improve it, as for instance (in
order of desirability and --very likely-- difficulty):
- Just make the error message less puzzling and more informative when
coming from the shell window (what does *buffer* mean in this context?) and let
the help file explain that this operation has only sense in connection with
Python scripts being edited (if that is
the case, as it seems).
- Disable the option in the shell window.
- Suppress the option in the shell window and keep it only in the editor
window when the document it is handling is recognised as a Python module.
- Keep the option also in the shell window and make it display information
about the classes defined in the namespace of the current interactive session,
if any. I think that this is what would be a real and useful *class browser*.
Thank you in advance for your attention.
----------
components: IDLE
messages: 172891
nosy: fgracia
priority: normal
severity: normal
status: open
title: IDLE: conceptual problems with *Class browser*
type: enhancement
versions: Python 3.3
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue16233>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com