What's the cheapest way to test for an empty dictionary in Python? if len(dict.keys() > 0) :
is expensive for large dictionaries, and makes loops O(N^2). John Nagle -- http://mail.python.org/mailman/listinfo/python-list
What's the cheapest way to test for an empty dictionary in Python? if len(dict.keys() > 0) :
is expensive for large dictionaries, and makes loops O(N^2). John Nagle -- http://mail.python.org/mailman/listinfo/python-list