On 2018-05-24 18:08, George Leslie-Waksman wrote:
I have had plenty of instances where destructuring a mapping would have
be convenient. Relating to iterable destructuring, I would expect the
syntax to be of the form "variable: key". I also think the curly-braces
make it harder to visually pars
I have had plenty of instances where destructuring a mapping would have be
convenient. Relating to iterable destructuring, I would expect the syntax
to be of the form "variable: key". I also think the curly-braces make it
harder to visually parse what's going on. So I might suggest something a
litt
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.
On Thu, May 24, 2018 at 8:00 AM Serhiy Storchaka
wrote:
> 24.05.18 11:38, Neil Girdhar пише:
> > I was previously constructing an object like this:
> >
> > tb = TemporalBehavior(**kwargs, **parameters)
> >
> > where various subclasses were doing things like
> >
> > def __init__(self, some_kwarg,
24.05.18 11:38, Neil Girdhar пише:
I was previously constructing an object like this:
tb = TemporalBehavior(**kwargs, **parameters)
where various subclasses were doing things like
def __init__(self, some_kwarg, some_other_kwargs, some_parameter,
some_other_parameter):
Then I realized that I
I was previously constructing an object like this:
tb = TemporalBehavior(**kwargs, **parameters)
where various subclasses were doing things like
def __init__(self, some_kwarg, some_other_kwargs, some_parameter,
some_other_parameter):
Then I realized that I want to pass the paramters as a dicti