Re:Anti-Patterns in Python Programming
by calvins on Wednesday July 09, 2014 @01:47PM
(#8011107)
I think only the second is truly bug-free. The first only does what the user expects if they pass in a non-empty list:
This shows up another subtle trap related to the "truthiness" (or falsiness in this case) of things like the empty list.
[ Parent
| on HN ]
There are no comments on this comment yet.