Message241798
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. |
|
Date |
User |
Action |
Args |
2015-04-22 13:13:46 | lemburg | set | recipients:
+ lemburg, vstinner, ezio.melotti |
2015-04-22 13:13:46 | lemburg | set | messageid: <1429708426.75.0.208318155296.issue24024@psf.upfronthosting.co.za> |
2015-04-22 13:13:46 | lemburg | link | issue24024 messages |
2015-04-22 13:13:46 | lemburg | create | |
|