Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#5744 closed (fixed)

SortedDict init with list of tuples

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

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@…> 17 years ago.

Download all attachments as: .zip

Change History (5)

by Thomas Güttler <hv@…>, 17 years ago

comment:1 by Thomas Güttler <hv@…>, 17 years ago

Cc: hv@… added

comment:2 by Chris Beaven, 17 years ago

Component: UncategorizedCore framework
Triage Stage: UnreviewedReady for checkin

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

comment:3 by Gary Wilson, 17 years ago

Resolution: fixed
Status: newclosed

(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 by Thomas Güttler <hv@…>, 17 years ago

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