[Python-ideas] Thoughts on "extended mapping unpacking"
Serhiy Storchaka
storchaka at gmail.com
Thu May 24 12:36:29 EDT 2018
24.05.18 18:46, Neil Girdhar пише:
> p = parameters.pop('some_parameter')
> q = parameters.pop('some_other_parameter')
> if parameters:
> raise ValueError
>
> parameters is a Mapping subclass and I don't want to destroy it
Oh, right. It works if parameters is a var-keyword parameter.
def __init__(self, some_kwarg, some_other_kwargs, **parameters):
More information about the Python-ideas
mailing list