Re: [Python-ideas] PEP draft: context variables

2017-10-12 Thread Koos Zevenhoven
On Thu, Oct 12, 2017 at 6:54 AM, Nick Coghlan wrote: > On 11 October 2017 at 21:58, Koos Zevenhoven wrote: > >> On Wed, Oct 11, 2017 at 7:46 AM, Steve Dower >> wrote: >> >>> Nick: “I like Yury's example for this, which is that the following two >>> examples are currently semantically equivalent

Re: [Python-ideas] PEP draft: context variables

2017-10-12 Thread Yury Selivanov
On Thu, Oct 12, 2017 at 8:59 AM, Koos Zevenhoven wrote: > On Thu, Oct 12, 2017 at 6:54 AM, Nick Coghlan wrote: [..] >> 1. Preserve the current behaviour, since we don't have a compelling reason >> to change its semantics >> 2. Change the behaviour, in order to gain >> > > 3. Introduce a new cont

Re: [Python-ideas] PEP draft: context variables

2017-10-12 Thread Koos Zevenhoven
On Oct 12, 2017 9:03 PM, "Yury Selivanov" wrote: On Thu, Oct 12, 2017 at 8:59 AM, Koos Zevenhoven wrote: > On Thu, Oct 12, 2017 at 6:54 AM, Nick Coghlan wrote: [..] >> 1. Preserve the current behaviour, since we don't have a compelling reason >> to change its semantics >> 2. Change the behaviou

Re: [Python-ideas] PEP draft: context variables

2017-10-12 Thread Yury Selivanov
> Although it is true that I plan to propose to use PEP 550 to > reimplement decimal APIs on top of it, and so far I haven't seen any > real-world examples of code that will be broken because of that. As > far as I know—and I've done some research—nobody uses decimal contexts > > and generators be

[Python-ideas] PEP draft: context variables

2017-10-12 Thread Stefan Krah
Yury Selivanov wrote: [generators and decimal] > Specifically for decimal: I tried to find bug reports on > bugs.python.org (found not even one), questions on stackoverflow (IIRC > I didn't find anything), and used github code search and google > (again, nothing directly relevant). I also don't

Re: [Python-ideas] PEP draft: context variables

2017-10-12 Thread Guido van Rossum
I'm out of energy to debate every point (Steve said it well -- that decimal/generator example is too contrived), but I found one nit in Nick's email that I wish to correct. On Wed, Oct 11, 2017 at 1:28 AM, Nick Coghlan wrote: > > As a less-contrived example, consider context managers implemented