[python3/en] Add empty tuple to "False if evaluated" list (#2587)

This commit is contained in:
kakakaya 2016-11-30 21:01:27 +09:00 committed by ven
parent 52bbc81520
commit d0918b2576

View File

@ -143,13 +143,13 @@ None # => None
"etc" is None # => False "etc" is None # => False
None is None # => True None is None # => True
# None, 0, and empty strings/lists/dicts all evaluate to False. # None, 0, and empty strings/lists/dicts/tuples all evaluate to False.
# All other values are True # All other values are True
bool(0) # => False bool(0) # => False
bool("") # => False bool("") # => False
bool([]) # => False bool([]) # => False
bool({}) # => False bool({}) # => False
bool(()) # => False
#################################################### ####################################################
## 2. Variables and Collections ## 2. Variables and Collections