Ronald Oussoren added the comment:
If I read the code correctly help(pyth.__init__) won't use the __signature__
because that is an attribute of the type, not of the method itself.
With the patch in issue17053 help should be better when __init__'s signatuer is
set explicitly:
class Stock(Structure):
__signature__ = make_signature(['name', 'shares', 'price'])
def __init__(self, *args, **kwds):
super(Stock, self).__init__(*args, **kwds)
__init__.__signature__ = __signature__
Sadly enough it isn't easily possible to define a subclass of function where
__signature__ is a property that returns the class attribute __signature__.
----------
nosy: +ronaldoussoren
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue17424>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com