Expression can be simplified on list

Random832 random832 at fastmail.com
Thu Sep 29 15:58:48 EDT 2016


On Thu, Sep 29, 2016, at 02:47, Rustom Mody wrote:
> Your example is exactly what I am saying; if a type has a behavior in
> which all values are always True (true-ish) its a rather strange kind
> of bool-nature.

For a given type T, if all objects of type T are true (true-ish, truthy,
whatever), it does make using an expression of type T in an if-statement
an incoherent thing to do, but it makes using an expression of type
Union[T, NoneType] reasonable.



More information about the Python-list mailing list