About the standard function bool(), Python's official documentation tells us the following : bool([x]) Convert a value to a Boolean, using the standard truth testing procedure. In this context, what exactly a "value" is referring to ? For instance, >>> x=42 >>> bool(x=5) True >>> but _expression_ : x=42 has no value.