Proposed implementation for an Ordered Dictionary

Paul Rubin http
Sun Mar 1 01:43:37 CET 2009


"Colin J. Williams" <cjw at ncf.ca> writes:
>      # print [mydict[x] for x in sorted(mydict.keys)] Instance object
> is not iterable

It was a typo.  Use:

    print [mydict[x] for x in sorted(mydict.keys())]



More information about the Python-list mailing list