Skip to content

DefaultSortedDict #244

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

Activity

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

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