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 serhiy.storchaka
Recipients Arfrever, barry, brett.cannon, bronger, cool-RR, daniel.ugra, ezio.melotti, georg.brandl, gvanrossum, pitrou, r.david.murray, serhiy.storchaka, tshepang
Date 2016-01-06.11:05:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1452078316.64.0.845821385911.issue22570@psf.upfronthosting.co.za>
In-reply-to
Content
`str(object)` is not a protocol for getting a string out of an object. It's a protocol for getting a string for print(). __str__ is defined for every object and therefore is useless for getting a string out of "string-like" object (as __float__ for floats and __bytes__ for bytes). Perhaps we need a new special method __string__ that relates to __str__ as __index__ to __int__.
History
Date User Action Args
2016-01-06 11:05:16serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, barry, brett.cannon, georg.brandl, pitrou, bronger, ezio.melotti, Arfrever, r.david.murray, daniel.ugra, cool-RR, tshepang
2016-01-06 11:05:16serhiy.storchakasetmessageid: <1452078316.64.0.845821385911.issue22570@psf.upfronthosting.co.za>
2016-01-06 11:05:16serhiy.storchakalinkissue22570 messages
2016-01-06 11:05:16serhiy.storchakacreate