miniblog.
← Back to all posts
May 14, 2013 at 17:30
Python gotcha of the day: an empty generator is truthy. Grr.
Wilfred Hughes
Related Posts
Dec 10, 2022 at 20:16
Arrays being truthy in JS still catches me out sometimes. In Python or Lisp, empty lists are falsey and truthiness is safe and idiomatic.
Wilfred Hughes
Shared words: truthy, Python, empty Score: 78.4
Jun 4, 2014 at 21:51
The use of fluid design on too many sites simply leads to ridiculously long line lengths. Grr. UIs should scale up as well as down.
Wilfred Hughes
Shared words: Grr Score: 41.3
Sep 11, 2014 at 11:58
Nasty Python 2 gotcha with hasattr():
[Python-Dev] 'hasattr' is broken by design
mail.python.org/pipermail/python-dev/2010-August/103178.html
Wilfred Hughes
Shared words: gotcha, Python Score: 30.9