Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mangling of double-underscore method argument names #1382

Closed
robertwb opened this issue Feb 21, 2014 · 1 comment
Closed

mangling of double-underscore method argument names #1382

robertwb opened this issue Feb 21, 2014 · 1 comment

Comments

@robertwb
Copy link
Contributor

CPython apparently does this:

class Spam:
    def eggs(__some_kwarg:int=None):
        print(__some_kwarg)

>>> Spam.eggs(10)
10
>>> Spam.eggs(_Spam__some_kwarg=10)
10

class Foo:
  def bar(self, *, __kw:'anno'='default'):
    pass

>>> Foo.bar.__annotations__
{'_Foo__kw': 'anno'}
>>> Foo.bar.__kwdefaults__
{'_Foo__kw': 'default'}

http://bugs.python.org/issue20625

Migrated from http://trac.cython.org/ticket/826

@scoder
Copy link
Contributor

scoder commented Apr 30, 2019

Nominating as release blocker since it's a bit of a breaking change (although not very like to occur in practice).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants