On Sat, Aug 26, 2017 at 04:13:24PM -0700, Nathaniel Smith wrote: > On Sat, Aug 26, 2017 at 7:58 AM, Elvis Pranskevichus <elpr...@gmail.com> > wrote: > > What we are talking about here is variable scope leaking up the call > > stack. I think this is a bad pattern. For decimal context-like uses > > of the EC you should always use a context manager. For uses like Web > > request locals, you always have a top function that sets the context > > vars. > > It's perfectly reasonable to have a script where you call > decimal.setcontext or np.seterr somewhere at the top to set the > defaults for the rest of the script.
+100. The only thing that makes sense for decimal is to change localcontext() to be automatically async-safe while preserving the rest of the semantics. Stefan Krah _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com