Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1175)

#22609: Constructors of some mapping classes don't accept `self` keyword argument

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 years ago by abacabadabacaba
Modified:
4 years, 3 months ago
Reviewers:
vadmium+py, storchaka, yselivanov
CC:
rhettinger, mark.dickinson, haypo, larry, abacabadabacaba_gmail.com, devnull_psf.upfronthosting.co.za, berkerpeksag, Martin Panter, storchaka, Yury Selivanov
Visibility:
Public.

Patch Set 1 #

Patch Set 2 #

Patch Set 3 #

Patch Set 4 #

Total comments: 4

Patch Set 5 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Lib/collections/__init__.py View 1 2 3 4 1 chunk +16 lines, -1 line 4 comments Download
Lib/test/test_userdict.py View 1 2 3 4 2 chunks +26 lines, -1 line 0 comments Download

Messages

Total messages: 7
Martin Panter
https://bugs.python.org/review/22609/diff/14385/Lib/collections/__init__.py File Lib/collections/__init__.py (right): https://bugs.python.org/review/22609/diff/14385/Lib/collections/__init__.py#newcode937 Lib/collections/__init__.py:937: if 'dict' in kwargs: “elif” would make more sense ...
4 years, 4 months ago #1
storchaka_gmail.com
https://bugs.python.org/review/22609/diff/14385/Lib/collections/__init__.py File Lib/collections/__init__.py (right): https://bugs.python.org/review/22609/diff/14385/Lib/collections/__init__.py#newcode937 Lib/collections/__init__.py:937: if 'dict' in kwargs: On 2015/05/31 02:05:22, vadmium wrote: ...
4 years, 4 months ago #2
Yury Selivanov
http://bugs.python.org/review/22609/diff/15160/Lib/collections/__init__.py File Lib/collections/__init__.py (right): http://bugs.python.org/review/22609/diff/15160/Lib/collections/__init__.py#newcode960 Lib/collections/__init__.py:960: dict = args[0] actually, it wasn't possible before to ...
4 years, 3 months ago #3
Yury Selivanov
Please ignore my last comment.. It's actually a desirable behaviour. LGTM.
4 years, 3 months ago #4
Martin Panter
http://bugs.python.org/review/22609/diff/15160/Lib/collections/__init__.py File Lib/collections/__init__.py (right): http://bugs.python.org/review/22609/diff/15160/Lib/collections/__init__.py#newcode958 Lib/collections/__init__.py:958: raise TypeError('expected at most 1 arguments, got %d' % ...
4 years, 3 months ago #5
storchaka_gmail.com
http://bugs.python.org/review/22609/diff/15160/Lib/collections/__init__.py File Lib/collections/__init__.py (right): http://bugs.python.org/review/22609/diff/15160/Lib/collections/__init__.py#newcode958 Lib/collections/__init__.py:958: raise TypeError('expected at most 1 arguments, got %d' % ...
4 years, 3 months ago #6
Martin Panter
4 years, 3 months ago #7
http://bugs.python.org/review/22609/diff/15160/Lib/collections/__init__.py
File Lib/collections/__init__.py (right):

http://bugs.python.org/review/22609/diff/15160/Lib/collections/__init__.py#ne...
Lib/collections/__init__.py:958: raise TypeError('expected at most 1 arguments,
got %d' % len(args))
On 2015/07/20 10:49:33, storchaka wrote:
> On 2015/07/20 06:16:15, vadmium wrote:
> > Technically this should be singular: “Expected at most one argument, got 81”
> 
> This follows the error message for dict().
> 
> >>> dict(1, 2)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> TypeError: dict expected at most 1 arguments, got 2

Since this case is a static message, I thought it would be easy to correct it.
But now I notice this message is repeated in other places in this file, so
perhaps it is a wider issue.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+