www.youtube.com/watch?v=1BmK...
www.youtube.com/watch?v=1BmK...
Have you written a post about other sorts of small scripts that you have on your system that are useful?
Have you written a post about other sorts of small scripts that you have on your system that are useful?
gist.github.com/adamsilkey/6...
gist.github.com/adamsilkey/6...
❯ python -m timeit -s 'a = 1' 'a is None'
50000000 loops, best of 5: 6.28 nsec per loop
❯ python -m timeit -s 'a = 1' 'a == None'
20000000 loops, best of 5: 15.1 nsec per loop
❯ python -m timeit -s 'a = 1' 'a is None'
50000000 loops, best of 5: 6.28 nsec per loop
❯ python -m timeit -s 'a = 1' 'a == None'
20000000 loops, best of 5: 15.1 nsec per loop
I agree with what @browniebroke.com said about how you formatted the comprehension to make it more readable. And if this were checked into prod code, I'd probably have explanatory comments in the code/commit.
I agree with what @browniebroke.com said about how you formatted the comprehension to make it more readable. And if this were checked into prod code, I'd probably have explanatory comments in the code/commit.