Checking against NULL will be eliminated?

Steven D'Aprano steve+comp.lang.python at pearwood.info
Wed Mar 2 20:48:14 EST 2011


On Wed, 02 Mar 2011 23:46:31 +0000, Steven D'Aprano wrote:

> For starters, how about giving an example of a built-in string, list or
> dictionary where `if len(x) == 0` and `if x` give different results?

Er, how embarrassment... of course I mean either len(x) != 0, or not x, 
take your pick.


-- 
Steven



More information about the Python-list mailing list