[issue21279] str.translate documentation incomplete

2015-01-25 Thread John Posner
John Posner added the comment: Per Martin's suggestion, deltas from issue21279.v5.patch: * no change to patch for doc/library/stdtypes.rst * doc string reflowed in patch for objects/unicodeobject.c -- Added file: http://bugs.python.org/file37855/issue21279.v6.patch

[issue21279] str.translate documentation incomplete

2014-12-23 Thread John Posner
John Posner added the comment: issue21279.v5.patch tries to apply the comments in msg233013, msg233014, and msg233025 to the Doc/library/stdtypes.rst writeup. Then it applies some of the same language to the docstring in Objects/unicodeobject.c. -- Added file: http://bugs.python.org

[issue21279] str.translate documentation incomplete

2014-12-21 Thread John Posner
John Posner added the comment: Patch of 12-21 looks good, Martin. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21279 ___ ___ Python-bugs-list

[issue21279] str.translate documentation incomplete

2014-12-19 Thread John Posner
John Posner added the comment: Regarding Martin's patch of 12-18: stdtypes.rst -- looks good to me unicodeobject.c -- I suggest changing this sentence: If a character is not in the table, the subscript operation should raise LookupError, and the character is left untouched

[issue21279] str.translate documentation incomplete

2014-12-15 Thread John Posner
John Posner added the comment: Kindly ignore message #2 on the Rietveld page (sorry for the channel noise). Here's my suggested revision: Return a copy of the string *str* in which each character has been mapped through the given translation *table*. The table must be a subscriptable object

[issue9536] defaultdict doc makes incorrect reference to __missing__ method

2010-08-08 Thread John Posner
John Posner jjpos...@optimum.net added the comment: I think it would be confusing to create of subclass of defaultdict, defining a __missing__ method in that subclass. The existence of the __missing__ method would cancel the main functionality of the defaultdict object: invoking the default

[issue9536] defaultdict doc makes incorrect reference to __missing__ method

2010-08-08 Thread John Posner
John Posner jjpos...@optimum.net added the comment: On python-list, Wolfram Hinderer objected to the proposed patch's calling __missing__ a special method. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9536

[issue9536] defaultdict doc makes incorrect reference to __missing__ method

2010-08-08 Thread John Posner
Changes by John Posner jjpos...@optimum.net: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9536 ___ ___ Python-bugs-list

[issue9536] defaultdict doc makes incorrect reference to __missing__ method

2010-08-06 Thread John Posner
New submission from John Posner jjpos...@optimum.net: The documentation for collections.defaultdict is confusing with respect to the __missing__ method. The fact is that a programmer using defaultdict does not need to know anything about __missing__. The attached patch contains a rewrite

[issue8012] Revise generator-related Glossary entries

2010-04-02 Thread John Posner
John Posner jjpos...@optimum.net added the comment: Georg, your change (r79587) makes this the main definition: generator A function which returns an iterator. I'm concerned that this definition does not fit well with the occurrence of generator object in the following: Python

[issue8012] Revise generator-related Glossary entries

2010-04-02 Thread John Posner
John Posner jjpos...@optimum.net added the comment: Fair enough, Georg. Case closed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8012

[issue5621] Add description of special case to Assignment statements section

2009-09-08 Thread John Posner
John Posner jjpos...@optimum.net added the comment: George, here is a patch file for this bug. It modifies file doc/reference/simple_stmts.rst Please let me know if this was the wrong way to submit the patch file. -- keywords: +patch status: pending - open Added file: http

[issue5621] Add description of special case to Assignment statements section

2009-03-31 Thread John Posner
New submission from John Posner john_posner_a...@post.harvard.edu: The subsection Augmented assignment statements includes a note on this special case: a.x += 1 But the parent section Assignment statements does not include such a note, even though it's essentially the same situation. I

[issue5621] Add description of special case to Assignment statements section

2009-03-31 Thread John Posner
John Posner john_posner_a...@post.harvard.edu added the comment: The Assignment statements section *does* talk about the RHS -- but in a subtle way: For targets which are attribute references, the initial value is retrieved with a getattr() The retrieving of the initial value (maybe