Django

Code

Ticket #5744 (closed: fixed)

Opened 10 months ago

Last modified 8 months ago

SortedDict init with list of tuples

Reported by: Thomas Güttler <hv@tbz-pariv.de> Assigned to: nobody
Milestone: Component: Core framework
Version: SVN Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

sorted_dict__init_tuples.diff (1.3 kB) - added by Thomas Güttler <hv@tbz-pariv.de> on 10/12/07 06:23:21.

Change History

10/12/07 06:23:21 changed by Thomas Güttler <hv@tbz-pariv.de>

  • attachment sorted_dict__init_tuples.diff added.

10/12/07 07:18:37 changed by Thomas Güttler <hv@tbz-pariv.de>

  • cc set to hv@tbz-pariv.de.
  • needs_better_patch changed.
  • needs_tests changed.
  • needs_docs changed.

10/12/07 20:47:51 changed by SmileyChris

  • component changed from Uncategorized to Core framework.
  • stage changed from Unreviewed to Ready for checkin.

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

10/13/07 23:17:03 changed by gwilson

  • status changed from new to closed.
  • resolution set to fixed.

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

01/08/08 10:12:24 changed by Thomas Güttler <hv@tbz-pariv.de>

  • cc deleted.

Add/Change #5744 (SortedDict init with list of tuples)




Change Properties
Action