Skip to content

collections.defaultdict documentation is confusing #131490

Closed as not planned
Closed as not planned
@tekknolagi

Description

@tekknolagi

Documentation

Calling defaultdict(default_factory=list) (as suggested by the docs) does not create a defaultdict where the default factory is list. Instead, it creates a defaultdict where the default_factory is None and elements {"default_factory": list}.

https://docs.python.org/3/library/collections.html#collections.defaultdict

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions