With new style classes __init__ documentation got from object if not overridden
pekkaklarck opened this issue · 0 comments
pekkaklarck commented
If a new style class has no __init__
, remote server incorrectly returns the generic docstring of object.__init__
when run on Jython or IronPython. In practice this means that you get following doc to the importing section:
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
This bug is due to inspect.isroutine(object().__init__)
returning True with Jython and IronPython. Because you get False with Python I assume this is a bug. Luckily we can workaround it by using inspect.ismethod(x) or inspect.isfunction(x)
instead of inspect.isroutine(x)
.