Message184540
| Author |
ronaldoussoren |
| Recipients |
jafo, ronaldoussoren |
| Date |
2013年03月18日.22:29:36 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1363645776.16.0.00177651655577.issue17424@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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__. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年03月18日 22:29:36 | ronaldoussoren | set | recipients:
+ ronaldoussoren, jafo |
| 2013年03月18日 22:29:36 | ronaldoussoren | set | messageid: <1363645776.16.0.00177651655577.issue17424@psf.upfronthosting.co.za> |
| 2013年03月18日 22:29:36 | ronaldoussoren | link | issue17424 messages |
| 2013年03月18日 22:29:36 | ronaldoussoren | create |
|