Issue2545

classification
Title: help() does not work on Java-implemented modules
Type: behaviour Severity: minor
Components: Versions:
Milestone:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: stefan.richthofer
Priority: low Keywords:

Created on 2017-02-01.21:16:59 by stefan.richthofer, last changed 2017-02-01.21:17:24 by stefan.richthofer.

Messages
msg11055 (view) Author: Stefan Richthofer (stefan.richthofer) Date: 2017-02-01.21:16:58
(Testing with Java 8 on Linux)

Jython 2.7.1b3 (default:77f1bcd04321+, Feb 1 2017, 19:21:14) 
[OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.8.0_121
Type "help", "copyright", "credits" or "license" for more information.
>>> import _imp
>>> print _imp.__doc__
This module provides the components needed to build your own
__import__ function.  Undocumented functions are obsolete.

>>> help(_imp)

#Help on class _imp:
#
#_imp = <type 'org.python.modules._imp'>

>>> import _weakref
>>> print _weakref.__doc__
Weak-reference support module.
>>> help(_weakref)
#Help on class _weakref in module __builtin__:
#
#_weakref = <type '_weakref'>
#(END)

>>> 


(By hand I inserted the text displayed by help in each case.)
I imported _weakref, because it sets up __doc__ using classDictInit while _imp only stores a plain __doc__-named static string.
In both cases __doc__ is present in dict correctly, but help fails to use it.
History
Date User Action Args
2017-02-01 21:17:24stefan.richthofersetpriority: low
type: behaviour
severity: normal -> minor
2017-02-01 21:16:59stefan.richthofercreate