Open
Description
Consider the following class:
class K:
def verbify(self):
"""Docstring"""
help() on the unbound method (actually a function) K.verbify
wrongly identifies it as a module-level function, displaying this in Python3.10:
Help on function verbify in module __main__:
verbify(self)
Docstring
It should identify the function using __qualname__
rather than __name__'
:
>>> K.verbify.__qualname__
'K.verbify'
>>> K.verbify.__name__
'verbify'
In contrast, help() on the bound method correctly identifies that verbify is a method belonging to K: help(K().verbify)
displays verbify() method of __main__.K instance
.