Issue 19663: Not so correct error message when initializing defaultdict (original) (raw)

Issue19663

Created on 2013-11-20 16:25 by vajrasky, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fix_error_message_default_dict.patch vajrasky,2013-11-20 16:25 review
Messages (5)
msg203500 - (view) Author: Vajrasky Kok (vajrasky) * Date: 2013-11-20 16:25
>>> from collections import defaultdict >>> defaultdict('') Traceback (most recent call last): File "", line 1, in TypeError: first argument must be callable >>> defaultdict(None) defaultdict(None, {}) >>> None() Traceback (most recent call last): File "", line 1, in TypeError: 'NoneType' object is not callable After patch: >>> from collections import defaultdict >>> defaultdict('') Traceback (most recent call last): File "", line 1, in TypeError: first argument must be callable or None
msg203586 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2013-11-21 08:46
This is a reasonable patch. I'll apply it when I have some spare time.
msg246935 - (view) Author: Milan Oberkirch (zvyn) * Date: 2015-07-19 08:59
*ping* This is still a reasonable patch. Would be great if you can apply it :)
msg246966 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-07-20 07:11
New changeset efda1eaf86a3 by Raymond Hettinger in branch '3.4': Issue #19663: Improve error message for defaultdict. https://hg.python.org/cpython/rev/efda1eaf86a3
msg246967 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-07-20 07:13
New changeset d248702feab0 by Raymond Hettinger in branch '2.7': Issue #19663: Improve error message for defaultdict. https://hg.python.org/cpython/rev/d248702feab0
History
Date User Action Args
2022-04-11 14:57:53 admin set github: 63862
2015-07-20 07:15:06 rhettinger set status: open -> closedresolution: fixedstage: resolved
2015-07-20 07:13:40 python-dev set messages: +
2015-07-20 07:11:26 python-dev set nosy: + python-devmessages: +
2015-07-19 08:59:43 zvyn set nosy: + zvynmessages: + versions: + Python 3.5, Python 3.6, - Python 3.3
2013-11-21 08:46:01 rhettinger set priority: normal -> lowassignee: rhettingermessages: + versions: + Python 2.7
2013-11-20 16:25:45 vajrasky create