dict1 < dict2 <=> len(dict1) <= len(dict2) ?
Thorsten Kampe
thorsten at thorstenkampe.de
Fri Oct 18 15:26:15 EDT 2002
Hi,
does anyone know what "dict1 < dict2" tests? I think it's equivalent
to "len(dict1) <= len(dict2)", but I could be wrong.
"{111: 111} < {11:11, 22:22}" but "{111: 111, 22:22} > {11:11, 22:22}"
made me guess: "'<' first tests the lengths and if they're the same
the keys are compared".
Anyone who doesn't guess but /knows/?!
Thorsten
More information about the Python-list
mailing list