R – Dictionary (from Python) component for Delphi


Is there similar component for Delphi like dictionary of Python?

I'm now using TStringList to map string/object pairs, but I'd like more general approach and maybe more powerful (TStringList has binary search when it is sorted).

Solutions for pre-D2009 are also welcome.

Best Solution

There is a THashedStringList class (subclassed from TStringList) "hidden" in IniFiles.pas that can significantly speed up searching in a string list based dictionary.