The Python Oracle

Why is the use of len(SEQUENCE) in condition values considered incorrect by Pylint?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Game 2 Looping

--

Chapters
00:00 Question
01:46 Accepted answer (Score 319)
02:47 Answer 2 (Score 46)
03:23 Answer 3 (Score 6)
04:57 Answer 4 (Score 0)
06:04 Thank you

--

Full question
https://stackoverflow.com/questions/4312...

Question links:
[definition on the reference guide]: https://pylint.readthedocs.io/en/latest/...

Accepted answer links:
[chepner’s comment]: https://stackoverflow.com/questions/4312...
[PEP 8 style guide]: https://www.python.org/dev/peps/pep-0008

Answer 3 links:
[PEP 8]: https://www.python.org/dev/peps/pep-0008/
[Zen of Python]: https://github.com/PyCQA/pylint/pull/281...
[PR 2815]: https://github.com/PyCQA/pylint/pull/281...
[issue 2684]: https://github.com/PyCQA/pylint/issues/2...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #conditionalstatements #pylint

#avk47