Truthiness
Ian Kelly
ian.g.kelly at gmail.com
Thu Oct 23 10:45:47 EDT 2014
More information about the Python-list mailing list
Thu Oct 23 10:45:47 EDT 2014
- Previous message (by thread): Truthiness
- Next message (by thread): Truthiness
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Oct 23, 2014 at 8:30 AM, Simon Kennedy <sffjunkie at gmail.com> wrote: > Just out of academic interest, is there somewhere in the Python docs where the following is explained? https://docs.python.org/3/reference/expressions.html#booleans >>>> 3 == True > False >>>> if 3: > print("It's Twue") > > It's Twue > > i.e. in the if statement 3 is True but not in the first No, 3 is merely true, not True. True is just the name of a particular singleton object that is also true.
- Previous message (by thread): Truthiness
- Next message (by thread): Truthiness
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list