On Tue, Nov 1, 2011 at 11:05 AM, Stephen J. Turnbull <span dir="ltr"><<a href="mailto:stephen@xemacs.org">stephen@xemacs.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Mike Meyer writes:<br>
> The proposed change doesn't prevent users from doing dangerous (and even<br>
> ugly things).<br>
I didn't say it did, it "merely" imposes substantial inconvenience in<br>
hope that:<br>
> It just forces them to *think* about what they're doing beforehand.<br>
which I believe to be un-Pythonic.<br></blockquote><div><br></div><div>Really? Thinking is unpythonic?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
But you say that you have an approach in mind which is reasonably<br>
performant and doesn't change things too much for single-threaded<br>
apps, which would make the discussion moot. So let's see how that<br>
works out.<br></blockquote><div><br></div><div>If all you want to do is get the old semantics back in a single-threaded application, you could do something like turning:</div><div><br></div><div>if __name__ == '__main__':</div>
<div> main()</div><div><br></div><div>into:</div><div><br></div><div>if __name__ == '__main__':</div><div> locking:</div><div> main()</div><div><br></div><div>Actually, that achieves my goal - you hopefully thought about this long enough to realize that this was safe before doing it.</div>
<div><br></div><div> <mike</div><div> </div></div><br>