miniblog.
← Back to all posts
Oct 20, 2011 at 23:44
#python surprise of the day: bool((False,)) => True
Wilfred Hughes
Related Posts
Dec 14, 2016 at 22:46
Another 'can't live without it' Emacs package: bool-flip:
https://github.com/michaeljb/bool-flip
toggle between true/false under the cursor.
GitHub - michaeljb/bool-flip
Contribute to michaeljb/bool-flip development by creating an account on GitHub.
Wilfred Hughes
Shared words: bool, False, True Score: 54.7
Jan 18, 2018 at 00:22
Whilst nil and t are rather strange as booleans, they're wonderfully easy to type. I've finally relented and written a yasnippet for Python because True and False are just too many keystrokes.
Wilfred Hughes
Shared words: python, False, True Score: 43.7
Oct 15, 2013 at 11:40
Yikes. On Python 2 `foo = lambda: 5; print foo > 6, foo() > 6` gives 'True False'. Hides tricky bugs. Another reason to move to Python 3.
Wilfred Hughes
Shared words: python, False, True Score: 43.7