New submission from Chris Jerdonek: The below should probably say something along the lines of "max expected 1 positional arguments" (since the foo value is an argument):
>>> max(foo=1) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: max expected 1 arguments, got 0 I imagine this affects other functions, but I haven't looked into which ones. Here is an example of another built-in function that provides a better message: >>> sorted(foo=1) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: Required argument 'iterable' (pos 1) not found ---------- components: Interpreter Core messages: 176034 nosy: chris.jerdonek priority: normal severity: normal status: open title: TypeError message incorrect for max() with no args type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16515> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com