: >> Anything wrong with this? >> >> def is_subdict(test_dct, base_dct): >> return test_dct <= base_dct and all(test_dct[k] == base_dct[k] for >> k in test_dct) > > It may raise a KeyError.
Really? That was what ``test_dct <= base_dct and`` ... is supposed to prevent. Have I missed something? -[]z. -- http://mail.python.org/mailman/listinfo/python-list