I needed to check if the object is one of the following types: dict, OrderedDict, defaultdict.
assert all([dictalike(x) for x in [dict(), OrderedDict(), defaultdict()]) assert not any([dictalike(x) for x in [str(), int(), float(), ...])
I needed to check if the object is one of the following types: dict, OrderedDict, defaultdict.
assert all([dictalike(x) for x in [dict(), OrderedDict(), defaultdict()]) assert not any([dictalike(x) for x in [str(), int(), float(), ...])