13 Sep
2016
13 Sep
'16
5:24 p.m.
On Wed, Sep 14, 2016 at 12:14 AM, Random832
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