On Wed, Sep 14, 2016 at 12:14 AM, Random832 <random...@fastmail.com> wrote: > On Tue, Sep 13, 2016, at 07:37, Nick Coghlan wrote: >> P.S. There are also some use cases where Look-Before-You-Leap is >> inherently subject to race conditions, > > Which use cases *aren't*?
Ones in which no external force can affect things. For example: def frob(spam): if spam is None: print("Frobbing nothing") else: print("Frobbing some spam: ", spam) ... You can safely assume that locals won't be changed between the 'is None' check and the print. I suppose someone could mess around with thread call stacks, but that'd be seriously insane. ChrisA _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/