Skip to content

Do not use mutable defaults for arguments #2501

@schwehr

Description

@schwehr

https://google.github.io/styleguide/pyguide.html#2124-decision

Do not use mutable objects as default values in the function or method definition.

An example:

layout_args={},

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions