[docs] Improve doc for str(bytesobject) (issue 13538)

chris.jerdonek at gmail.com chris.jerdonek at gmail.com
Mon Nov 19 10:28:44 CET 2012


http://bugs.python.org/review/13538/diff/6626/Doc/library/functions.rst
File Doc/library/functions.rst (right):

http://bugs.python.org/review/13538/diff/6626/Doc/library/functions.rst#newcode1268
Doc/library/functions.rst:1268: representation :func:`repr` of *object*.
On 2012/11/19 10:08:13, ezio.melotti wrote:
> This sentence doesn't sound too well.  Maybe "If *object* does not
have an
> :meth:`object.__str__` method, then :func:`str` falls back on calling
> :meth:`object.__repr__`"?

I prefer saying what the function "returns" rather than what it "calls,"
because it is more to the point.  I also wanted to parallel the first
sentence.  By the way, it calls repr() (PyObject_Repr) rather than
object.__repr__().  Given that, can you suggest other wording you would
prefer?

http://bugs.python.org/review/13538/


More information about the docs mailing list