[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

Evgeny Kapun report at bugs.python.org
Sat Oct 11 14:04:09 CEST 2014


New submission from Evgeny Kapun:

>>> import collections
>>> collections.Counter(self=1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __init__() got multiple values for argument 'self'
>>> collections.OrderedDict(self="test")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __init__() got multiple values for argument 'self'
>>> collections.UserDict(self="test")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __init__() got multiple values for argument 'self'

Python surely should have positional-only parameters.

----------
components: Library (Lib)
messages: 229076
nosy: abacabadabacaba
priority: normal
severity: normal
status: open
title: Constructors of some mapping classes don't accept `self` keyword argument
type: behavior
versions: Python 3.4

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


More information about the Python-bugs-list mailing list