[Guido]
> In reality there often are other conditions being applied to the match for
> which `if expr as name` is inadequate. The simplest would be something like
>
> if ...:
>
> elif (m := re.match('(.*):(.*)', line)) and m.group(1) == m.group(2):
>
>
> And the match() call may not
Please stop debating ` as `. Nobody is being swayed by anything
in this subthread. Let's move on.
On Sun, Apr 22, 2018 at 3:27 PM, Chris Angelico wrote:
> On Mon, Apr 23, 2018 at 8:20 AM, Mike Miller
> wrote:
> >
> > On 2018-04-22 14:33, Chris Angelico wrote:
> >>
> >> with open(fn) as f:
> >>
On Sun, Apr 22, 2018 at 3:13 PM, Steve Dower wrote:
> This example makes me want “if expr as name:” (same semantics as ‘with’,
> and the name is always bound to the expression result regardless of
> truthiness), but doesn’t move me on assignment expressions.
>
In reality there often are other co
On Mon, Apr 23, 2018 at 8:20 AM, Mike Miller wrote:
>
> On 2018-04-22 14:33, Chris Angelico wrote:
>>
>> with open(fn) as f:
>> with (open(fn) as f):
>>
>> These two do the same thing, but only because a file object's
>> __enter__ returns self. So it's dangerous, because it WILL work... and
>> peo
On 2018-04-22 14:33, Chris Angelico wrote:
with open(fn) as f:
with (open(fn) as f):
These two do the same thing, but only because a file object's
__enter__ returns self. So it's dangerous, because it WILL work... and
people will get into the habit of parenthesizing to permit a 'with'
statement
This example makes me want “if expr as name:” (same semantics as ‘with’, and
the name is always bound to the expression result regardless of truthiness),
but doesn’t move me on assignment expressions.
Cheers,
Steve
Top-posted from my Windows phone
From: Guido van Rossum
Sent: Saturday, April 2
On Mon, Apr 23, 2018 at 6:22 AM, Mike Miller wrote:
> On 2018-04-22 12:37, Chris Angelico wrote:
>> Kinda, except that that's not quite a match either. But mainly, the
>> comparison with 'with' and 'except' is dangerously incompatible.
>
> Hmm, looks very close conceptually, though mechanics are d
On 2018-04-22 12:37, Chris Angelico wrote:
> Kinda, except that that's not quite a match either. But mainly, the
> comparison with 'with' and 'except' is dangerously incompatible.
Hmm, looks very close conceptually, though mechanics are different.
Dangerous feels like an exaggeration however. I
On 2018-04-21 19:57, Chris Angelico wrote:
Thanks for being patient.
Looks like the crux of the issue is that "with … as" binds the result of the
enter function rather than the context-manager object, as it might first appear.
Therefore it's not compatible with how "as" is used for direct nam
On Sunday, April 22, 2018, Paul Moore wrote:
> On 22 April 2018 at 15:39, Nick Coghlan wrote:
> > On 22 April 2018 at 21:47, Paul Moore wrote:
> >> On 22 April 2018 at 00:05, Brett Cannon wrote:
> >>> The Zulip project maintainers are active on our instance so after you
> join
> >>> go to the
On 22 April 2018 at 15:39, Nick Coghlan wrote:
> On 22 April 2018 at 21:47, Paul Moore wrote:
>> On 22 April 2018 at 00:05, Brett Cannon wrote:
>>> The Zulip project maintainers are active on our instance so after you join
>>> go to the Zulip stream and start a topic about this.
>>
>> I did - "Z
2018-04-22 14:10 GMT+03:00 Kirill Balunov :
>
> Although one of the prerequisites for writing this PEP was the use of the
> assignment expression in the lists
>
Sorry, typo: in compehensions/generators.
> it will rarely be used in them, and even more rarely it will be a
> justified usage of.
>
2018-04-21 4:44 GMT+03:00 Tim Peters :
> [Chris Angelico ]
> > I don't see much value in restricting the assignment target to names
> > only, but if that's what it takes, it can be restricted, at least
> > initially.
>
> I believe this point was made most clearly before by Terry Reedy, but
> it be
On 22 April 2018 at 21:47, Paul Moore wrote:
> On 22 April 2018 at 00:05, Brett Cannon wrote:
>> The Zulip project maintainers are active on our instance so after you join
>> go to the Zulip stream and start a topic about this.
>
> I did - "Zulip -> Sign up". I don't know of a way to put a link t
On 17 April 2018 at 19:46, Oleg Sivokon wrote:
> It is common practice in corporate networks that connect MS Windows machines
> to redirect all (encrypted included) traffic through company's router.
If this has only started happening recently, then the cause is more
likely to be related to PyPI
On 22 April 2018 at 00:05, Brett Cannon wrote:
> The Zulip project maintainers are active on our instance so after you join
> go to the Zulip stream and start a topic about this.
I did - "Zulip -> Sign up". I don't know of a way to put a link to
that topic here, but I assume it's findable in the
On 12 April 2018 at 09:59, Ethan Smith wrote:
> Hello,
>
> I've updated PEP 561 to clarify that any installed stub package should
> supersede an installed inline package. In other words if there is:
>
> /global/site-packages/pkg/
> /user/site-packages/pkg-stubs/
>
> Even if pkg in the global site
On Sun, Apr 22, 2018 at 7:29 PM, Christoph Groth
wrote:
> If I had to choose between the above and ":= binding expressions", I
> guess I would tend to prefer the latter because they are sufficient,
> nicer looking and offer less potential for trouble. But I think that it
> is worth to fully discu
Tim Peters wrote:
> [Christoph Groth ]
> > I hope to have shown [1] that the same could be done for
> > assignments. A consistent value can be defined for any assignment
> > statement. So, all assignment statements could be redefined as
> > expressions and the language would continue to work and
On 17Apr2018 0246, Oleg Sivokon wrote:
> It is common practice in corporate networks that connect MS Windows ...
> If you are referring to Python on Windows, this was never true. We've
> always relied on OpenSSL and at best will read locally installed
> certificates (and by default, most certifica
Replying also to the list.
On 22 April 2018 at 09:14, Ivan Levkivskyi wrote:
> On 20 April 2018 at 21:59, Guido van Rossum wrote:
>
>> Does the PEP currently propose to *allow* that horrible example? I
>> thought Tim Peters successfully pleaded to *only* allow a single "NAME :=
>> ". You don't
21 matches
Mail list logo