Pylint: Catch-22 with input

Created on 28 Jun 2018  路  3Comments  路  Source: PyCQA/pylint

Steps to reproduce

  1. Use pylint --py3k
  2. Run on a file like this
try:
    blank = raw_input("Oops!")
except:
    blank = input("Oops!")
  1. Get frustrated by conflicting errors.

Current behavior

************* Module demo
W:  2, 9: raw_input built-in referenced (raw_input-builtin)
W:  4, 9: input built-in referenced (input-builtin)

Expected behavior

Nothing, as this should be recognized the same way as:

try:
    blank = xrange(0, 1)
except:
    blank = range(0, 1)

pylint --version output

No config file found, using default configuration
pylint 1.9.2,
astroid 1.6.5
Python 2.7.15 (default, May 16 2018, 17:50:09)
[GCC 8.1.1 20180502 (Red Hat 8.1.1-1)]
bug topic-python-3-porting

Most helpful comment

What do you mean what do we do about it?

All 3 comments

Yes, this is a bug!

Great! Now what do we do about it?

What do you mean what do we do about it?

Was this page helpful?
0 / 5 - 0 ratings