Message6966
As the documentation says, "partial objects are like function objects in that they... can have attributes." So aside from the three read-only attributes, partial objects should not just take __doc__ but any other attribute.
In cpython,
>>> from functools import partial
>>> basetwo = partial(int, base=2)
>>> basetwo.x = 123
>>> basetwo.x
123
But in jython,
>>> from functools import partial
>>> basetwo = partial(int, base=2)
>>> basetwo.x = 123
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: '_functools.partial' object has no attribute 'x' |
|
Date |
User |
Action |
Args |
2012-03-27 07:07:28 | jeff250 | set | messageid: <1332832048.62.0.0412720903745.issue1730@psf.upfronthosting.co.za> |
2012-03-27 07:07:28 | jeff250 | set | recipients:
+ jeff250, smeatonj, hyao |
2012-03-27 07:07:28 | jeff250 | link | issue1730 messages |
2012-03-27 07:07:28 | jeff250 | create | |
|