This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author crkirkwood
Recipients bignose, crkirkwood, docs@python, georg.brandl, r.david.murray, terry.reedy
Date 2014-11-14.21:25:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <06ea01d00051$6945afb0$3bd10f10$@us>
In-reply-to <>

>-----Original Message-----
>From: Terry J. Reedy []
>Sent: Friday, November 14, 2014 1:04 PM
>Subject: [issue22843] doc error: 6.2.4. Match Objects
>Terry J. Reedy added the comment:
>David is correct that the current phrasing is correct.  The phase 'x has
>a boolean value of True' means 'bool(x) is True', which is always true
>for match objects, as well as for non-zero numbers, non-empty
>collections, and many other things.  This does *not* imply equality
>between the object and its boolean value.  In fact, nearly all objects
>are not equal to their boolean value.  Clayton could just as well as
>have written "blah = 'a'" or "blah = 1 + 1j" and gotten the name non-
>surprising result.
>There is nothing special about boolean values in this respect.  The
>string value of x is str(x) and in general, x != str(x).  (This also
>sometimes confuses people.)  Similarly, if x has an integral value
>int(x), it does not necessarily equal that value: int(3.1459) != 3.
>I think the doc is fine as is.  The fact that "3 is considered to be '3'
>in a display context" does not mean that we do not write "the string
>value of 3 is '3'".  It is fundamental to Python that essentially all
>objects o have a string value str(o) and a boolean value bool(o) and
>that those mappings are sometimes used automatically for display and
>nosy: +terry.reedy
>Python tracker <>
Date User Action Args
2014-11-14 21:25:16crkirkwoodsetrecipients: + crkirkwood, georg.brandl, terry.reedy, r.david.murray, docs@python, bignose
2014-11-14 21:25:15crkirkwoodlinkissue22843 messages
2014-11-14 21:25:15crkirkwoodcreate