Skip to content

DefaultSortedDict #244

Open
Open
@asarkar

Description

@asarkar

The introduction shows the following example. Why not make this a first-class citizen fo the library instead of asking every user who needs it to create their own?

class DefaultSortedDict(SortedDict):
  def __missing__(self, key):
    value = 0
      self[key] = value
        return value

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions