Closed antazoey closed 5 months ago
Right now, this confusingly fails:
data = eth_tester_provider.web3.eth.get_block("latest") size = data.pop("size", None)
AttributeError: 'AttributeDict' object has no attribute 'pop'
My workaround is this:
data = {**eth_tester_provider.web3.eth.get_block("latest")} size = data.pop("size", None)
My feature request is to add the pop method to AttributeDict so it works the same as regular dicts in that regard.
pop
AttributeDict
AttributeDict was created with the idea that it should be immutable. It seems like if you want to pop things from it, copying then popping would be the way to go.
What feature should we add?
Right now, this confusingly fails:
AttributeError: 'AttributeDict' object has no attribute 'pop'
My workaround is this:
My feature request is to add the
pop
method toAttributeDict
so it works the same as regular dicts in that regard.