[issue3354] sort(reverse=None) prints misleading error message

Christoph Zwerschke report at bugs.python.org
Mon Jul 14 14:54:23 CEST 2008


New submission from Christoph Zwerschke <cito at online.de>:

When you sort a list with list.sort() or sorted(list), and set the
reverse parameter to None, then you get the following misleading error
message:

    TypeError: an integer is required

I would expect a more proper error message for the reverse parameter,
such as "reverse must be a boolean", and maybe reverse=None also
accepted as default value, i.e. False.

----------
components: Interpreter Core
messages: 69651
nosy: cito
severity: normal
status: open
title: sort(reverse=None) prints misleading error message
type: behavior
versions: Python 2.4, Python 2.5, Python 2.6

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


More information about the Python-bugs-list mailing list