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 lemburg
Recipients ezio.melotti, lemburg, vstinner
Date 2015-04-22.13:13:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1429708426.75.0.208318155296.issue24024@psf.upfronthosting.co.za>
In-reply-to
Content
In Python 3.4.3, the doc string of the str() builtin still reads:

"str(object='') -> str\nstr(bytes_or_buffer[, encoding[, errors]]) -> str\n\nCreate a new string object from the given object. If encoding or\nerrors is specified, then the object must expose a data buffer\nthat will be decoded using the given encoding and error handler.\nOtherwise, returns the result of object.__str__() (if defined)\nor repr(object).\nencoding defaults to sys.getdefaultencoding().\nerrors defaults to 'strict'."

This no longer matches what str() does. sys.getdefaultencoding() always returns 'utf-8' and str() accepts bytes, bytearray or buffer-like objects as input when using an encoding, any object with .__str__() method defined or repr(obj) otherwise.
History
Date User Action Args
2015-04-22 13:13:46lemburgsetrecipients: + lemburg, vstinner, ezio.melotti
2015-04-22 13:13:46lemburgsetmessageid: <1429708426.75.0.208318155296.issue24024@psf.upfronthosting.co.za>
2015-04-22 13:13:46lemburglinkissue24024 messages
2015-04-22 13:13:46lemburgcreate