Message211215
| Author |
jonasw |
| Recipients |
jonasw |
| Date |
2014年02月14日.11:57:28 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1392379048.74.0.239094025936.issue20625@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Assume I have this code:
class Spam:
def eggs(__some_kwarg:int=None):
print(__some_kwarg)
I can call Spam.bar with keyword arguments as expected from mangling:
>>> Spam.eggs(10)
10
>>> Spam.eggs(_Spam__some_kwarg=10)
10
However, in the __annotations__ field, the argument name is not mangled:
>>> Spam.eggs.__annotations__
{'__some_kwarg': <class 'int'>}
This is an inconsistency which makes it difficult to work with function annotations in this case. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年02月14日 11:57:28 | jonasw | set | recipients:
+ jonasw |
| 2014年02月14日 11:57:28 | jonasw | set | messageid: <1392379048.74.0.239094025936.issue20625@psf.upfronthosting.co.za> |
| 2014年02月14日 11:57:28 | jonasw | link | issue20625 messages |
| 2014年02月14日 11:57:28 | jonasw | create |
|