This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients christian.heimes, marco.buttu, mark.dickinson, terry.reedy
Date 2013-08-04.07:30:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1375601424.81.0.304513811112.issue18570@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2013-08-04 07:30:24mark.dickinsonsetrecipients: + mark.dickinson, terry.reedy, christian.heimes, marco.buttu
2013-08-04 07:30:24mark.dickinsonsetmessageid: <1375601424.81.0.304513811112.issue18570@psf.upfronthosting.co.za>
2013-08-04 07:30:24mark.dickinsonlinkissue18570 messages
2013-08-04 07:30:24mark.dickinsoncreate