Name: flake8-mutable
Owner: Zapier
Description: flake8 extension for mutable default arguments
Forked from: ebeweber/flake8-mutable
Created: 2017-09-29 05:11:11.0
Updated: 2017-09-29 05:11:13.0
Pushed: 2017-10-03 07:41:51.0
Homepage: https://pypi.python.org/pypi/flake8-mutable
Size: 14
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Python's default arguments are evaluated at definition as opposed to when the function is invoked. This leads to unexpected behavior, as mutations persist between calls. For a more detailed explanation, see The Hitchhiker's Guide to Python.
fnc(a, b={}):
pass
py:2:14: M511 - mutable default arg of type Dict
install flake8-mutable