cf
Dict.
pop
If key is not found, d is returned if given, otherwise KeyError is raised.
cf.Dict.keys
cf.Dict.popitem