[issue13538] Improve doc for str(bytesobject)

2012-11-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5c39e3906ce9 by Chris Jerdonek in branch '3.2': Fix label in docs (from issue #13538). http://hg.python.org/cpython/rev/5c39e3906ce9 -- ___ Python tracker rep...@bugs.python.org

[issue13538] Improve doc for str(bytesobject)

2012-11-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset f32f1cb508ad by Chris Jerdonek in branch '3.2': Improve str() and object.__str__() documentation (issue #13538). http://hg.python.org/cpython/rev/f32f1cb508ad New changeset 6630a1c42204 by Chris Jerdonek in branch '3.3': Null merge from 3.2 (issue

[issue13538] Improve doc for str(bytesobject)

2012-11-20 Thread Chris Jerdonek
Changes by Chris Jerdonek chris.jerdo...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13538

[issue13538] Improve doc for str(bytesobject)

2012-11-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: Updating patch after Ezio's review on Rietveld. -- Added file: http://bugs.python.org/file28040/issue-13538-6-default.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13538

[issue13538] Improve doc for str(bytesobject)

2012-11-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: Attaching new patch to address Ezio's further comments (for the convenience of comparing in Rietveld). I will be committing this. -- Added file: http://bugs.python.org/file28045/issue-13538-7-default.patch ___

[issue13538] Improve doc for str(bytesobject)

2012-11-19 Thread Éric Araujo
Éric Araujo added the comment: I left a few remarks. The patch is very nice, thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13538 ___

[issue13538] Improve doc for str(bytesobject)

2012-11-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks, Éric! (And thanks also to Ezio who helped quite a bit with the improvements.) I replied to your comments on Rietveld. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13538

[issue13538] Improve doc for str(bytesobject)

2012-11-10 Thread Chris Jerdonek
Changes by Chris Jerdonek chris.jerdo...@gmail.com: Added file: http://bugs.python.org/file27944/issue-13538-5-default.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13538 ___

[issue13538] Improve doc for str(bytesobject)

2012-11-10 Thread Chris Jerdonek
Changes by Chris Jerdonek chris.jerdo...@gmail.com: Removed file: http://bugs.python.org/file27939/issue-13538-4-default.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13538 ___

[issue13538] Improve doc for str(bytesobject)

2012-11-09 Thread Chris Jerdonek
Chris Jerdonek added the comment: New patch incorporating Ezio's suggestions, along with some other changes. -- Added file: http://bugs.python.org/file27939/issue-13538-4-default.patch ___ Python tracker rep...@bugs.python.org

[issue13538] Improve doc for str(bytesobject)

2012-10-16 Thread Chris Jerdonek
Chris Jerdonek added the comment: Attaching updated patch based on Ezio and Antoine's comments. Let me know if I'm not using the correct or preferred terminology around buffer objects and the buffer protocol. It doesn't seem like the section on the buffer protocol actually says what objects

[issue13538] Improve doc for str(bytesobject)

2012-10-16 Thread Chris Jerdonek
Chris Jerdonek added the comment: Reattaching patch (a line was missing). -- Added file: http://bugs.python.org/file27592/issue-13538-3-default.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13538

[issue13538] Improve doc for str(bytesobject)

2012-10-16 Thread Ezio Melotti
Ezio Melotti added the comment: + str(bytes, encoding[, errors='strict']) + str(bytes, errors[, encoding='utf-8']) Why not simply str(bytes, encoding='utf-8', errors='strict')? (Your signature suggests that str(b'abc', 'strict') should work.) + the string itself.

[issue13538] Improve doc for str(bytesobject)

2012-10-15 Thread Ezio Melotti
Ezio Melotti added the comment: Instead of documenting what *encoding* and *errors* do, I would just say that str(bytesobj, encoding, errors) is equivalent to bytesobj.decode(encoding, errors) (assuming it really is). I don't like encodings/decodings done via the str/bytes constructors, and

[issue13538] Improve doc for str(bytesobject)

2012-10-15 Thread Chris Jerdonek
Chris Jerdonek added the comment: I would just say that str(bytesobj, encoding, errors) is equivalent to bytesobj.decode(encoding, errors) (assuming it really is). Good suggestion. And yes, code is shared in the following way:

[issue13538] Improve doc for str(bytesobject)

2012-10-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Indeed: m = memoryview(b) str(m, utf-8) '' m.decode(utf-8) Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'memoryview' object has no attribute 'decode' -- ___ Python tracker

[issue13538] Improve doc for str(bytesobject)

2012-10-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note: character buffer isn't a term we use anymore (in Python 3, that is). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13538 ___

[issue13538] Improve doc for str(bytesobject)

2012-10-13 Thread Chris Jerdonek
Chris Jerdonek added the comment: Attaching a proposed patch along the lines suggested by Éric. -- keywords: +patch versions: +Python 3.4 Added file: http://bugs.python.org/file27556/issue-13538-1-default.patch ___ Python tracker

[issue13538] Improve doc for str(bytesobject)

2012-10-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: This may have been addressed to some extent by issue 14783: http://hg.python.org/cpython/rev/3773c98d9da8 -- nosy: +chris.jerdonek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13538

[issue13538] Improve doc for str(bytesobject)

2012-07-25 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy stage: - needs patch type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13538 ___

[issue13538] Improve doc for str(bytesobject)

2011-12-12 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I think Eric's suggestion is the proper approach. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13538 ___

[issue13538] Improve doc for str(bytesobject)

2011-12-12 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13538 ___ ___

[issue13538] Improve doc for str(bytesobject)

2011-12-10 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- title: Docstring of str() and/or behavior - Improve doc for str(bytesobject) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13538 ___