[issue23040] Better documentation for the urlencode safe parameter

2014-12-24 Thread R. David Murray
R. David Murray added the comment: Thanks, Wojtek. -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.4 ___ Python tracker ___ __

[issue23040] Better documentation for the urlencode safe parameter

2014-12-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 126aff7c6a33 by R David Murray in branch '3.4': #23040: Clarify treatment of encoding and errors when component is bytes. https://hg.python.org/cpython/rev/126aff7c6a33 New changeset 367ba031a743 by R David Murray in branch 'default': Merge: #23040:

[issue23040] Better documentation for the urlencode safe parameter

2014-12-13 Thread Wojtek Ruszczewski
Wojtek Ruszczewski added the comment: Updated the patch, additionally changing "be" to "contain" in the first sentence. -- Added file: http://bugs.python.org/file37439/urlencode-safe-v2.diff ___ Python tracker ___

[issue23040] Better documentation for the urlencode safe parameter

2014-12-12 Thread Wojtek Ruszczewski
Wojtek Ruszczewski added the comment: Thanks, that's right and better, as it doesn't replicate the safe explanation. I've just noticed another small one, the docstring for quote() [2] says: "encoding must not be specified if string is a str" -- that should be "... is a bytes". [2] https://hg.p

[issue23040] Better documentation for the urlencode safe parameter

2014-12-12 Thread R. David Murray
R. David Murray added the comment: OK, now I understand. How about this phrasing: "The *safe*, *encoding*, and *error* parameters are passed down to :func:`quote_plus` (the *encoding* and *error* parameters are only passed when the query element is a :class:`str`). -- __

[issue23040] Better documentation for the urlencode safe parameter

2014-12-12 Thread Wojtek Ruszczewski
Wojtek Ruszczewski added the comment: I was looking at the sentence: "When query parameter is a str, the safe, encoding and error parameters are passed down to quote_plus() for encoding." The query argument can't be a string itself (gives a TypeError with 3.5a0 and I think it's only intended t

[issue23040] Better documentation for the urlencode safe parameter

2014-12-12 Thread R. David Murray
R. David Murray added the comment: The current documentation looks very clear to me, and I don't understand your changed version. Can you give an example of how the existing text is inaccurate or results in confusion? -- nosy: +r.david.murray ___ P

[issue23040] Better documentation for the urlencode safe parameter

2014-12-12 Thread Wojtek Ruszczewski
New submission from Wojtek Ruszczewski: The documentation for urlencode() [1] isn't very clear on how the safe parameter is used, it would better not list it together with encoding and error as only applying to strings. [1] https://docs.python.org/3.5/library/urllib.parse.html#urllib.parse.url