[issue33422] Fix and update string/byte literals in help()

2018-05-07 Thread Andrés Delfino
Andrés Delfino added the comment: I was exploring pydoc, saw the literals as available help "terms" on the sysmbols section, and tried reading the help for one of them. I learnt about IDLE debugging to trace this bug :) -- ___

[issue33422] Fix and update string/byte literals in help()

2018-05-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Andrés! I just wondering how did you discover this bug? -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior versions: +Python 2.7, Python

[issue33422] Fix and update string/byte literals in help()

2018-05-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset c40eeeb5e69df12a5f46edc7ba82ec75c7d1b820 by Serhiy Storchaka (Andrés Delfino) in branch '2.7': [2.7] bpo-33422: Fix quotation marks getting deleted when looking up byte/string literals on pydoc. (GH-6701)

[issue33422] Fix and update string/byte literals in help()

2018-05-05 Thread Andrés Delfino
Change by Andrés Delfino : -- pull_requests: +6405 ___ Python tracker ___ ___

[issue33422] Fix and update string/byte literals in help()

2018-05-05 Thread miss-islington
miss-islington added the comment: New changeset 0ba812b1bee65a6cad16f153a7f5074bc271e0e5 by Miss Islington (bot) in branch '3.6': bpo-33422: Fix quotation marks getting deleted when looking up byte/string literals on pydoc. (GH-6701)

[issue33422] Fix and update string/byte literals in help()

2018-05-05 Thread miss-islington
miss-islington added the comment: New changeset 351782b9927c610ff531100dbdcbbd19d91940a3 by Miss Islington (bot) in branch '3.7': bpo-33422: Fix quotation marks getting deleted when looking up byte/string literals on pydoc. (GH-6701)

[issue33422] Fix and update string/byte literals in help()

2018-05-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +6403 ___ Python tracker ___

[issue33422] Fix and update string/byte literals in help()

2018-05-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +6402 ___ Python tracker ___

[issue33422] Fix and update string/byte literals in help()

2018-05-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b2043bbe6034b53f5ad337887f4741b74b70b00d by Serhiy Storchaka (Andrés Delfino) in branch 'master': bpo-33422: Fix quotation marks getting deleted when looking up byte/string literals on pydoc. (GH-6701)

[issue33422] Fix and update string/byte literals in help()

2018-05-04 Thread Andrés Delfino
Andrés Delfino added the comment: I have updated the PR. Now symbols show: Here is a list of the punctuation symbols which Python assigns special meaning to. Enter any symbol to get more help. != + <= __ "

[issue33422] Fix and update string/byte literals in help()

2018-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Option 2 LGTM. -- ___ Python tracker ___

[issue33422] Fix and update string/byte literals in help()

2018-05-04 Thread Andrés Delfino
Andrés Delfino added the comment: And what should symbols show in pydoc? Should symbols show: 1. All legal combinations with ("'", '"') (48 possible combinations) 2. Only b/f/r/u with ("'", '"') (IMHO, this is the most reasonable option) 3. Only b/f/r/u with ' or "

[issue33422] Fix and update string/byte literals in help()

2018-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't think we need to support prefixes without quotes or with triple qoutes. 'ur' is not valid prefix. Using simplified code from tokenize: _strprefixes = [''.join(u) + q for t in ('b', 'r',

[issue33422] Fix and update string/byte literals in help()

2018-05-04 Thread Andrés Delfino
Andrés Delfino added the comment: To get the 144 combinations I used the logic in tokenize.py: import re def _combinations(*l): return set( x + y for x in l for y in l + ("",) if x.casefold() != y.casefold() ) _strprefixes = ( _combinations('r', 'R',

[issue33422] Fix and update string/byte literals in help()

2018-05-04 Thread Andrés Delfino
Andrés Delfino added the comment: Eric, I entered "r'" in the interactive prompt. Serhiy, using the code in tokenize, I got a total of 144 combinations. For comparison, the list of symbols help() shows, after the proposed change, has 67 items. IMHO, we should compromise.

[issue33422] Fix and update string/byte literals in help()

2018-05-04 Thread Eric V. Smith
Eric V. Smith added the comment: It's not clear to me what you're typing to get the output in the first message. Can you clarify? Is this at the interactive prompt? -- ___ Python tracker

[issue33422] Fix and update string/byte literals in help()

2018-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Interesting, I didn't know that pydoc supports this. Specifying all possible prefixes is cumbersome and errorprone. The number of combinations grows exponentially with adding new letters. I suggest either to specify only

[issue33422] Fix and update string/byte literals in help()

2018-05-03 Thread Andrés Delfino
Andrés Delfino added the comment: *While the list is still incomplete -- ___ Python tracker ___

[issue33422] Fix and update string/byte literals in help()

2018-05-03 Thread Andrés Delfino
Change by Andrés Delfino : -- keywords: +patch pull_requests: +6393 stage: -> patch review ___ Python tracker ___

[issue33422] Fix and update string/byte literals in help()

2018-05-03 Thread Andrés Delfino
New submission from Andrés Delfino : Right now, for string/byte literals help() shows, for example: No Python documentation found for 'r'. Use help() to get the interactive help utility. Use help(str) for help on the str class. PR fixes the quotation mark removal and