Mark Dickinson added the comment:

> With that fixed, I am inclined to close this.

Agreed.  I'll try to find some time for a PEP at some point in the next few 
weeks.

> I had thought of a set-mode function (method), but anticipate objection
> to such modal action-at-distance behavior.

Yes;  I'm not a big fan of global state[*] either in general, but there aren't 
many other good options:  specifying the mode to each operation individually 
would be painful and prevent natural use of infix operators, generally making 
code more unreadable.  There *would* need to be some kind of set-mode function 
(or perhaps writable sys module attribute) as you suggest, but the context 
manager could be promoted as the recommended way to change the state in a 
manner that's reasonably safe and explicit.


[*] We'd want it to be thread-local rather than global, of course.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18570>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to