New submission from Julien Férard <julien_fer...@yahoo.fr>:

When passing no argument to `range`, the error message states that (exactly) 
one argument is expected.

Actual:

    Python 3.9.0a0 (heads/master:d395209653, Jan  3 2020, 11:37:03)
    [GCC 7.4.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> range()
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    TypeError: range expected 1 argument, got 0

Expected message:

    TypeError: range expected at least 1 argument, got 0

(See for instance:

    >>> eval()
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    TypeError: eval expected at least 1 argument, got 0
)

----------
components: Interpreter Core
messages: 359236
nosy: jferard
priority: normal
severity: normal
status: open
title: Inaccurate TypeError message for `range` without argument
type: enhancement
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39200>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to