New submission from Vajrasky Kok: >>> from collections import defaultdict >>> defaultdict('') Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: first argument must be callable >>> defaultdict(None) defaultdict(None, {}) >>> None() Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'NoneType' object is not callable
After patch: >>> from collections import defaultdict >>> defaultdict('') Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: first argument must be callable or None ---------- components: Extension Modules files: fix_error_message_default_dict.patch keywords: patch messages: 203500 nosy: rhettinger, vajrasky priority: normal severity: normal status: open title: Not so correct error message when initializing defaultdict type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32722/fix_error_message_default_dict.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19663> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com