On Mon, Feb 8, 2021 at 4:21 PM Random832 wrote:
>
> > On Sat, Feb 6, 2021 at 5:21 PM Random832 wrote:
> > >
> > > While we're on the subject of assignment expression limitations, I've
> > > occasionally wanted to write something like
> > >
> > > try:
> > > return a_dict[key]
> > > except
> On Sat, Feb 6, 2021 at 5:21 PM Random832 wrote:
> >
> > While we're on the subject of assignment expression limitations, I've
> > occasionally wanted to write something like
> >
> > try:
> > return a_dict[key]
> > except KeyError:
> > return (a_dict[key] := expression to construct
On Sat, Feb 6, 2021 at 8:54 PM Paul Sokolovsky wrote:
>
> Hello,
>
> On Sat, 6 Feb 2021 17:26:00 +1100
> Chris Angelico wrote:
>
> > On Sat, Feb 6, 2021 at 5:21 PM Random832
> > wrote:
> > >
> > > While we're on the subject of assignment expression limitations,
> > > I've occasionally wanted to
Hello,
On Sat, 6 Feb 2021 17:26:00 +1100
Chris Angelico wrote:
> On Sat, Feb 6, 2021 at 5:21 PM Random832
> wrote:
> >
> > While we're on the subject of assignment expression limitations,
> > I've occasionally wanted to write something like
> >
> > try:
> > return a_dict[key]
> > except
Hello,
On Sat, 6 Feb 2021 10:46:54 +0200
Serhiy Storchaka wrote:
> 05.02.21 09:51, Paul Sokolovsky пише:
> > a0 = 0
> > b0 = 10
> > while ((a1, b1) := phi([a0, a2], [b0, b2]))[0] < 5:
> > a2 = a1 + 1
> > b2 = b1 + 1
>
> Such code quickly becomes unreadable. Especially if in real code
Hello,
On Sat, 6 Feb 2021 06:17:08 +1100
Chris Angelico wrote:
> On Sat, Feb 6, 2021 at 6:08 AM Paul Sokolovsky
> wrote:
> > And looking back now, that seems like intentionally added accidental
> > gap in the language (https://en.wikipedia.org/wiki/Accidental_gap).
> > Similar to artificially
On 2021-02-05 22:18, Random832 wrote:
While we're on the subject of assignment expression limitations, I've
occasionally wanted to write something like
try:
return a_dict[key]
except KeyError:
return (a_dict[key] := expression to construct value)
You can already do that with
On Sat, Feb 6, 2021 at 5:21 PM Random832 wrote:
>
> While we're on the subject of assignment expression limitations, I've
> occasionally wanted to write something like
>
> try:
> return a_dict[key]
> except KeyError:
> return (a_dict[key] := expression to construct value)
That's what
While we're on the subject of assignment expression limitations, I've
occasionally wanted to write something like
try:
return a_dict[key]
except KeyError:
return (a_dict[key] := expression to construct value)
___
Python-ideas mailing list --
On Sat, Feb 6, 2021 at 6:08 AM Paul Sokolovsky wrote:
> And looking back now, that seems like intentionally added accidental
> gap in the language (https://en.wikipedia.org/wiki/Accidental_gap).
> Similar to artificially limiting decorator syntax, which was already
> un-limited. But seems,
Hello,
Thanks for the reply.
On Fri, 5 Feb 2021 13:32:25 -0500
Terry Reedy wrote:
> On 2/5/2021 2:51 AM, Paul Sokolovsky wrote:
>
> > https://www.python.org/dev/peps/pep-0572/
> ...
>
> ((a, b) := (1, 2))
> >File "", line 1
> > SyntaxError: cannot use assignment expressions
11 matches
Mail list logo