[issue21261] Teach IDLE to Autocomplete dictionary keys

2021-05-11 Thread Tal Einat
Change by Tal Einat : -- keywords: -easy, patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue21261] Teach IDLE to Autocomplete dictionary keys

2021-05-11 Thread Tal Einat
Change by Tal Einat : -- keywords: +patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue21261] Teach IDLE to Autocomplete dictionary keys

2021-05-11 Thread Tal Einat
Tal Einat added the comment: Note that I've created a new version of the latest PR, with support for dict keys of type bytes removed. -- ___ Python tracker ___ __

[issue21261] Teach IDLE to Autocomplete dictionary keys

2021-05-11 Thread Tal Einat
Change by Tal Einat : -- pull_requests: +24684 pull_request: https://github.com/python/cpython/pull/26039 ___ Python tracker ___ ___

[issue21261] Teach IDLE to Autocomplete dictionary keys

2020-09-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: > the PR allows using either type of quote when typing completions. Only if one types a quote before the box pops up. In this case, there is no auto popup and one must request completions. The box then uses the quote typed. Thereafter, there is no choice.

[issue21261] Teach IDLE to Autocomplete dictionary keys

2020-09-20 Thread Tal Einat
Tal Einat added the comment: People still get confused between bytes and strings, even with Python 3, especially novice programmers who are a major target audience of IDLE. I simply thought it would be confusing if string dict keys did appear in the completion list, but bytes keys did not.

[issue21261] Teach IDLE to Autocomplete dictionary keys

2020-09-20 Thread Tal Einat
Tal Einat added the comment: Also, please note that the PR allows using either type of quote when typing completions. -- ___ Python tracker ___ __

[issue21261] Teach IDLE to Autocomplete dictionary keys

2020-09-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: The current patch completes both strings keys and bytes keys mixed together. I want to challenge this. 0. What is the use case? The current patch nearly doubles the autocomple code, which handle user actions up to creation of a completion list. I would pr

[issue21261] Teach IDLE to Autocomplete dictionary keys

2019-08-08 Thread Tal Einat
Tal Einat added the comment: Many thanks for the review, Kyle! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue21261] Teach IDLE to Autocomplete dictionary keys

2019-08-07 Thread Kyle Stanley
Kyle Stanley added the comment: > I have not yet thoroughly tested it though, and would like some feedback on > it. I performed some testing on Linux and it looks good as far as I can tell. I added a few minor suggestions, but the auto-complete seems to be functioning as desired. -

[issue21261] Teach IDLE to Autocomplete dictionary keys

2019-08-07 Thread Tal Einat
Tal Einat added the comment: Raymond, your with may just come true! I've just created PR GH-15169 with a new implementation of my own, complete with tests. I have not yet thoroughly tested it though, and would like some feedback on it. -- ___ Py

[issue21261] Teach IDLE to Autocomplete dictionary keys

2019-08-07 Thread Tal Einat
Change by Tal Einat : -- pull_requests: +14901 pull_request: https://github.com/python/cpython/pull/15169 ___ Python tracker ___ ___

[issue21261] Teach IDLE to Autocomplete dictionary keys

2019-08-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for going through the history of this issue. It was surprisingly convoluted. I still hope this feature comes to fruition. -- ___ Python tracker

[issue21261] Teach IDLE to Autocomplete dictionary keys

2019-08-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: The history is confusing. bpo user Louie Lu (louielu), as github user 'noname louisom', open PR 1511 for this existing issue on 2017 May 9. On May 12, he opened #30348 and PR 1512 with the tests for fetch_completions and get_entity that were part of PR 1511

[issue21261] Teach IDLE to Autocomplete dictionary keys

2019-08-05 Thread Tal Einat
Tal Einat added the comment: I had no idea that this was desired... I had this working in a old version of autocomplete back before 2010! I'm not sure whether I'll be able to find it though. I can't understand why Louie's PR was closed, it seemed to be going in the right direction... Any e

[issue21261] Teach IDLE to Autocomplete dictionary keys

2017-05-11 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: -Python 2.7, Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue21261] Teach IDLE to Autocomplete dictionary keys

2017-05-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: IDLE currently completes global names, attributes after ., and filename segments after / or \ within a string. In the later two cases, a box will pop up automatically after a user selected time after typing . or /\ and nothing thereafter. The filename segmen

[issue21261] Teach IDLE to Autocomplete dictionary keys

2017-05-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think it would be unusual for tab completion to work on non-strings and would create a weird feel to the API. -- ___ Python tracker ___ __

[issue21261] Teach IDLE to Autocomplete dictionary keys

2017-05-09 Thread Louie Lu
Louie Lu added the comment: I'm not sure the "safer" meaning. If it is about for beginner less confuse when mistakenly typing "d[long_", the answer will be yes for only complete string keys. Impl complexity between str-only and not-str-only will not have too much different, only need to chang

[issue21261] Teach IDLE to Autocomplete dictionary keys

2017-05-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: Would it be safer/simpler to just autocomplete string keys. -- ___ Python tracker ___ ___ Python-

[issue21261] Teach IDLE to Autocomplete dictionary keys

2017-05-08 Thread Louie Lu
Louie Lu added the comment: In this PR, it will complete dictionary key with string, int, and others. for example: d = {'long_key': 10, 'short_key': 20, 30: 40, (((1, 2), 3, 4), 5): 50} d['lo -> d['long_key' d[(((1 -> d[(((1, 2), 3, 4), 5) d[3-> d[30 The problem is, autoco

[issue21261] Teach IDLE to Autocomplete dictionary keys

2017-05-08 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +1612 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue21261] Teach IDLE to Autocomplete dictionary keys

2016-05-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks. Being on Windows, I never paid attention to rlcompleter. The big difference is that IDLE completions use IDLE's hyperparser module (which is used for other purposes also). I will look at the tests. -- ___

[issue21261] Teach IDLE to Autocomplete dictionary keys

2016-05-13 Thread Martin Panter
Martin Panter added the comment: I have no idea how IDLE works internally, but I wonder if it is possible to share some of the work with the Readline completer (rlcompleter module). Despite the name, rlcompleter should be usable without also using Readline, though recently (Issue 25660) I thin

[issue21261] Teach IDLE to Autocomplete dictionary keys

2014-06-20 Thread Eduardo Seabra
Eduardo Seabra added the comment: I've added three lines to cls.code to test_hyperparser. So I can test for subscripts with double quotes, single quotes and with no strings at all. Should I implement try_open_completions_event for COMPLETE_DICTIONARY? Calling this event everytime someone types

[issue21261] Teach IDLE to Autocomplete dictionary keys

2014-06-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: String keys is what Raymond requested and what looks sensible to me. A week ago, I committed test_idle/test_hyperparser.py and an incomplete test_autocomplete.py. So we can now, for this issue, at least partly follow our standard procedure of requiring tests w

[issue21261] Teach IDLE to Autocomplete dictionary keys

2014-06-19 Thread Eduardo Seabra
Eduardo Seabra added the comment: >From the example, I couldn't know if the patch should also autocomplete int >and other types. So here's a patch that autocompletes string dictionary keys. I'm new contributing so let me know if I made anything wrong and I'll fix as soon as possible. -

[issue21261] Teach IDLE to Autocomplete dictionary keys

2014-05-22 Thread Jason Browne
Changes by Jason Browne : -- nosy: +cdspace ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue21261] Teach IDLE to Autocomplete dictionary keys

2014-04-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: Looks sensible. -- nosy: +terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue21261] Teach IDLE to Autocomplete dictionary keys

2014-04-16 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- keywords: +easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue21261] Teach IDLE to Autocomplete dictionary keys

2014-04-16 Thread Raymond Hettinger
New submission from Raymond Hettinger: IDLE can autocomplete global variable, method names, and filenames. But, it cannot complete dictionary keys. Here's what we want: >>> d = {'long_key': '10, 'short_key': 20} >>> d['lo -- components: IDLE messages: 216542 nosy: rhettinger pr