Skip to content

removed a default mutable argument pitfall#88

Open
NaelsonDouglas wants to merge 1 commit intoaaPanel:7.xfrom
python-pitfalls:7.x
Open

removed a default mutable argument pitfall#88
NaelsonDouglas wants to merge 1 commit intoaaPanel:7.xfrom
python-pitfalls:7.x

Conversation

@NaelsonDouglas
Copy link

The problem
In Python it usually dangerous to use mutable arguments like dicts or lists as default arguments in methods, as is better explained here

the solution
This PR applies a simple refactoring to remove a case where a method was created using default a mutable argument

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant