On Oct 12, 2017 9:03 PM, "Yury Selivanov" <yselivanov.ml@gmail.com> wrote:
On Thu, Oct 12, 2017 at 8:59 AM, Koos Zevenhoven <k7hoven@gmail.com> wrote:
> On Thu, Oct 12, 2017 at 6:54 AM, Nick Coghlan <ncoghlan@gmail.com> 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 <end user benefit>
> 3. Introduce a new context manager that behaves intuitively. My guess is
> that the two context managers could even be made to interact with each other
> in a fairly reasonable manner, even if you nest them in different orders.
> I'm not sure how necessary that is.

Note that this is an independent argument w.r.t. both PEPs.  PEP 550
does not propose to change existing decimal APIs.  It merely uses
decimal to illustrate the problem, and suggests a fix using the new

Of course this particular point is independent. But not all the other points are.

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 researchnobody uses decimal contexts
and generators because of the associated problems.  It's a chicken and
egg problem.

I've been inclined to think so too. But that kind of research would be useful for decimal ifand only ifyou share your methodology. It's not at all clear how one would do research to arrive at such a conclusion.

—Koos (mobile)