Re: [Python-Dev] PEP 561 implemented and minor clarification

2018-04-22 Thread Ivan Levkivskyi
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

Re: [Python-Dev] Introducing python.zulipchat.com

2018-04-22 Thread Paul Moore
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

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-22 Thread Christoph Groth
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

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-22 Thread Chris Angelico
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

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-22 Thread Ivan Levkivskyi
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*

Re: [Python-Dev] https://bugs.python.org/issue33127 breaks pip / easy_install / pipenv etc in corporate networks on MS Windows using self-signed certificates

2018-04-22 Thread Oleg Sivokon
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

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-22 Thread Chris Angelico
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

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-22 Thread Mike Miller
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.

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-22 Thread Chris Angelico
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

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-22 Thread Steve Dower
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

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-22 Thread Mike Miller
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'

Re: [Python-Dev] Introducing python.zulipchat.com

2018-04-22 Thread Paul Moore
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

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-22 Thread Kirill Balunov
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

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-22 Thread Mike Miller
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

Re: [Python-Dev] Introducing python.zulipchat.com

2018-04-22 Thread Wes Turner
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

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-22 Thread Guido van Rossum
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

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-22 Thread Guido van Rossum
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

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-22 Thread Tim Peters
[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

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-22 Thread Kirill Balunov
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

Re: [Python-Dev] https://bugs.python.org/issue33127 breaks pip / easy_install / pipenv etc in corporate networks on MS Windows using self-signed certificates

2018-04-22 Thread Nick Coghlan
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

Re: [Python-Dev] Introducing python.zulipchat.com

2018-04-22 Thread Nick Coghlan
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