Add sets to empty things that are false

This commit is contained in:
Stephan Spindler 2022-07-27 21:38:53 +02:00 committed by GitHub
parent ae7233323b
commit adc474c4c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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