On 8/2/2014 8:13 AM, Robert Kern wrote:
On 2014-08-02 09:33, Heinz Schmitz wrote:
Akira Li wrote:

Look at how `help('modules')` is implemented. Though it crashes on my
system.

Have you reported this at bugs.python.org or is there already an issue
for the problem that you see?

It is this issue for python2.7:
https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/896836

python3 doesn't crash with currently installed packages.

Python 2.7 on Windows XP Sp2 doesn't crash with this. So it seems to
be a python<->OS-problem.

It is a local system problem.

Well, it's just that `help('modules')` imports every module in the
calling process (at least in Python 2.7; I haven't checked Python 3).
Some extension modules conflict with each other and cause a crash when
both are imported together. It's possible that you just don't have such
modules installed. While the proximate cause of the crash is in the 3rd
party modules, Python could (and maybe Python 3 does) import each module
in a separate subprocess and collect the information that way.

That would slow down help('modules') much more.  The suggestion in
http://bugs.python.org/issue12902
"help("modules") executes module code"
is that help() should instead parse the module to get the docstring.

--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to