Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Pylint duplicate declaration

  • pylint can find such problems, along with a bunch of others.
pylint -E duplicate_add.py

Output:

************* Module duplicate_add
examples/functions/duplicate_add.py:4:0: E0102: function already defined line 1 (function-redefined)
examples/functions/duplicate_add.py:9:0: E1121: Too many positional arguments for function call (too-many-function-args)