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(), ...])
Na FreeHostingu Endora běží desítky tisíc webů. Přidejte se ještě dnes!
Vytvořit web zdarmaNa FreeHostingu Endora běží desítky tisíc webů. Přidejte se ještě dnes!
Vytvořit web zdarma
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(), ...])