Message194328
> 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. |
|
Date |
User |
Action |
Args |
2013-08-04 07:30:24 | mark.dickinson | set | recipients:
+ mark.dickinson, terry.reedy, christian.heimes, marco.buttu |
2013-08-04 07:30:24 | mark.dickinson | set | messageid: <1375601424.81.0.304513811112.issue18570@psf.upfronthosting.co.za> |
2013-08-04 07:30:24 | mark.dickinson | link | issue18570 messages |
2013-08-04 07:30:24 | mark.dickinson | create | |
|