Message211215
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. |
|
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 | |
|