LowercaseDict
Documentation for eth_defi.vault.lower_case_dict.LowercaseDict Python class.
- class LowercaseDict
Bases:
dictA dictionary subclass that automatically converts all string keys to lowercase.
Because of legacy, Ethrereum services mix loewrcased and checksum-case addresses
Ethereum checksum addresse where a f**king bad idea and everyone needs to suffer from this shitty idea for the eternity
Methods summary
__init__(*args, **kwargs)clear()copy()fromkeys([value])Create a new dictionary with keys from iterable and values set to value.
get(key[, default])Override get method to convert string keys to lowercase.
items()keys()pop(k[,d])If the key is not found, return the default if given; otherwise, raise a KeyError.
popitem()Remove and return a (key, value) pair as a 2-tuple.
setdefault(key[, default])Override setdefault to convert string keys to lowercase.
update([other])Override update to convert string keys to lowercase.
values()- __init__(*args, **kwargs)
- get(key, default=None)
Override get method to convert string keys to lowercase.
- update(other=None, **kwargs)
Override update to convert string keys to lowercase.
- setdefault(key, default=None)
Override setdefault to convert string keys to lowercase.
- __new__(**kwargs)
- clear() None. Remove all items from D.
- copy() a shallow copy of D
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- values() an object providing a view on D's values