Commits 13bc139 and 8a4cd70 introduced subtle changes in the evaluation logic
of unpacking operations. Previously, all elements were evaluated prior to being
collected in a container. Now, these operations are interleaved. For example,
the code `[*a, *b]` used to evaluate in the order `a` -> `b`
05.02.20 14:27, Musbur пише:
I have one suggestion: Wouldn't it be useful for these operators to also
accept sets (functionally acting like a dict with None for all values)?
This would make it very elegant to 'normalize' dicts by pruning (dict &
set) or padding (set | dict) dictionaries. I woul
On Thu, Feb 6, 2020 at 3:47 AM Brandt Bucher wrote:
>
> > I have one suggestion: Wouldn't it be useful for these operators to also
> > accept sets (functionally acting like a dict with None for all values)?
>
> > Why None? Why not 0, or False, or 42? This sort of thing belongs more in
> > a f
> I have one suggestion: Wouldn't it be useful for these operators to also
> accept sets (functionally acting like a dict with None for all values)?
> Why None? Why not 0, or False, or 42? This sort of thing belongs more in a
> function or method, IMHO.
Well, in their defense, None is the nu
On 05/02/2020 12:27, Musbur wrote:
I have one suggestion: Wouldn't it be useful for these operators to also
accept sets (functionally acting like a dict with None for all values)?
This would make it very elegant to 'normalize' dicts by pruning (dict &
set) or padding (set | dict) dictionaries.
This is a great PEP. Just recently I needed this and was surprised that
nothing of the sort had been implemented yet (I looked for quite some
time).
I have one suggestion: Wouldn't it be useful for these operators to also
accept sets (functionally acting like a dict with None for all values)?
On 2020-02-04, 01:00 GMT, Brett Cannon wrote:
> I think people also forget that prior to worrying about
> maintaining backwards-compatibility with Python 2 we
> deprecated for a release and then we removed (so an 18 month
> deprecation period).
But then you mustn’t filter out deprecation warnin