[issue29133] Minor inaccuracy in shlex.shlex punctuation_chars example

2017-01-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset af5b34b2d169 by Vinay Sajip in branch '3.6': Fixes #29133: clarified shlex documentation. https://hg.python.org/cpython/rev/af5b34b2d169 New changeset e3d820c0c884 by Vinay Sajip in branch 'default': Closes #29133: merged update from 3.6. https://hg

[issue29133] Minor inaccuracy in shlex.shlex punctuation_chars example

2017-01-09 Thread Marco Buttu
Marco Buttu added the comment: Here is a 3rd patch with the Berker's suggestion. I just limited the output to 79 characters per line, and made use of the +NORMALIZE_WHITESPACE option (to normalize the newline inside the output). -- Added file: http://bugs.python.org/file46225/issue291

[issue29133] Minor inaccuracy in shlex.shlex punctuation_chars example

2017-01-07 Thread Vinay Sajip
Vinay Sajip added the comment: I'm fine with removing the loop, as there are only ever going to be the two cases - so Berker's suggestion would seem to cover both doctest and unittest cases. -- ___ Python tracker

[issue29133] Minor inaccuracy in shlex.shlex punctuation_chars example

2017-01-06 Thread Berker Peksag
Berker Peksag added the comment: I'd probably write it without the for loop: text = "a && b; c && d || e; f >'abc'; (def \"ghi\")" result = shlex.shlex(text) print(f"Old behavior: {list(result)}") result = shlex.shlex(text, punctuation_chars=True) print(f"New behavior: {lis

[issue29133] Minor inaccuracy in shlex.shlex punctuation_chars example

2017-01-04 Thread Marco Buttu
Changes by Marco Buttu : -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue29133] Minor inaccuracy in shlex.shlex punctuation_chars example

2017-01-04 Thread Marco Buttu
Marco Buttu added the comment: I did not add the doctest directive on purpose. In fact, if in the future we start running the doctests with buildbot (see issue27200), the tests related to this issue will pass only for Python >= 3.6. If we _currently_ want the doctests to pass for every Python

[issue29133] Minor inaccuracy in shlex.shlex punctuation_chars example

2017-01-03 Thread Evan
Evan added the comment: Second patch looks good, thanks. Do you also want to doctest that? -- ___ Python tracker ___ ___ Python-bugs-l

[issue29133] Minor inaccuracy in shlex.shlex punctuation_chars example

2017-01-03 Thread Marco Buttu
Marco Buttu added the comment: Yes, you are right. Here is a patch. -- Added file: http://bugs.python.org/file46128/issue29133_2nd.patch ___ Python tracker ___ __

[issue29133] Minor inaccuracy in shlex.shlex punctuation_chars example

2017-01-02 Thread Evan
Evan added the comment: Sorry for not being more clear in the original report - the error is in the code, not in the output. The old behavior is punct=False, the new is punct=True. -- ___ Python tracker __

[issue29133] Minor inaccuracy in shlex.shlex punctuation_chars example

2017-01-02 Thread Marco Buttu
Marco Buttu added the comment: Thank you. The patch fixes it and makes the example under doctest. -- keywords: +patch nosy: +marco.buttu Added file: http://bugs.python.org/file46114/issue29133.patch ___ Python tracker

[issue29133] Minor inaccuracy in shlex.shlex punctuation_chars example

2017-01-02 Thread Evan
New submission from Evan: https://docs.python.org/3/library/shlex.html#improved-compatibility-with-shells The code sample here does not match the output - the first line is labelled 'New' and the second line 'Old'. -- assignee: docs@python components: Documentation messages: 284481 nos