[Python-Dev] LinkedHashSet/LinkedHashMap equivalents

"Martin v. Löwis" martin at v.loewis.de
Wed Mar 9 23:34:23 CET 2005


James Y Knight wrote:
> I use ordered dictionaries for testing. With an ordered dict I can 
> string compare the output of my program to what is expected. Without an 
> ordered dict, I'd have to re-parse the output and order it, which would 
> require some complicated code that's just as likely to be wrong as the 
> code I'm trying to test.

I see. I would argue that you were better off if the test cases were 
sorted (according to some total, stable-across-releases, order), rather
than being ordered.

Regards,
Martin


More information about the Python-Dev mailing list