dict1 < dict2 <=> len(dict1) <= len(dict2) ?
Tim Peters
tim.one at comcast.net
Sun Oct 20 22:04:24 EDT 2002
[Tim]
> 2. Comparing a dict against an empty dict, as in
>
> while dict > {}:
[Delaney, Timothy]
> Do people actually do that Tim? That's brain dead ...
>
> while not dict:
No, *that's* brain dead <wink>. What a normal person does is
while dict:
Perhaps those who get burned by writing "not dict" instead feel that "dict >
{}" is clearer. I haven't seen it often in any case.
More information about the Python-list
mailing list