[New-bugs-announce] [issue14607] method with special keyword-only argument gives error

Florent Xicluna report at bugs.python.org
Tue Apr 17 23:28:16 CEST 2012


New submission from Florent Xicluna <florent.xicluna at gmail.com>:

This is probably a bug.


>>> class A:
...   def f(self, __a=42):
...     pass
... 
>>> A().f()
>>> class A:
...   def f(self, *, __a=42):
...     pass
... 
>>> A().f()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: f() needs keyword-only argument _A__a

----------
components: Interpreter Core
messages: 158568
nosy: flox
priority: normal
severity: normal
status: open
title: method with special keyword-only argument gives error
type: behavior
versions: Python 3.2, Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14607>
_______________________________________


More information about the New-bugs-announce mailing list