Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#5744 closed (fixed)

SortedDict init with list of tuples

Reported by: Thomas Güttler <hv@…> Owned by: nobody
Component: Core (Other) Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

This small patch improves SortedDict. You can give
to the constructor a list of tuples. Since dict
supports this interface, SortedDict should support it, too.

It is convenient, if you want to give SortedDict some initial data.

The patch includes a test.

Attachments (1)

sorted_dict__init_tuples.diff (1.3 KB) - added by Thomas Güttler <hv@…> 7 years ago.

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by Thomas Güttler <hv@…>

comment:1 Changed 7 years ago by Thomas Güttler <hv@…>

  • Cc hv@… added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 7 years ago by SmileyChris

  • Component changed from Uncategorized to Core framework
  • Triage Stage changed from Unreviewed to Ready for checkin

Sure, looks good enough and like Thomas said, it matches dict's interface

comment:3 Changed 7 years ago by gwilson

  • Resolution set to fixed
  • Status changed from new to closed

(In [6506]) Fixed #5744 -- Allowed SortedDict contructor to be passed a list of tuples to match the interface of dict, thanks Thomas Güttler.

comment:4 Changed 7 years ago by Thomas Güttler <hv@…>

  • Cc hv@… removed
Note: See TracTickets for help on using tickets.
Back to Top