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:28jonaswsetrecipients: + jonasw
2014-02-14 11:57:28jonaswsetmessageid: <1392379048.74.0.239094025936.issue20625@psf.upfronthosting.co.za>
2014-02-14 11:57:28jonaswlinkissue20625 messages
2014-02-14 11:57:28jonaswcreate