Skip to content

With new style classes __init__ documentation got from object if not overridden #13

@pekkaklarck

Description

@pekkaklarck

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).

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions