This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients Eduardo.Seabra, aeros, cdspace, louielu, martin.panter, rhettinger, taleinat, terry.reedy
Date 2020-09-20.07:08:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1600585684.9.0.247059220099.issue21261@roundup.psfhosted.org>
In-reply-to
Content
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 prefer smaller.

1. We agreed on completing 'string keys'. Bytes are not strings.  Bytes might represent an encoded string, but might instead be anything else.  Some bytes are represented by ascii chars, but the majority need hex escapes.

2. Including bytes forces quoting keys in the list box in order to add the 'b' prefix for bytes.  I said above that we should quote anyway, but that was before working with the implementation and discovering the resulting usage issues.

3. Including bytes makes it harder to select a key by typing a partial key.  Suppose d had hundreds of key, a to z.  One want to select 'zeta13  c3'.
>>> d[ <pause> opens a list box with starting with the 'a' words.
One enters 'z'.  Nothing happens because no entry starts with 'a'.
Backspace, enter "'z".  Nothings happens because the default quote used in the listbox is '"'.  If 'b' did not possibly represent a bytes prefix, we could either remove surrounding quotes or ignore them when matching.
History
Date User Action Args
2020-09-20 07:08:05terry.reedysetrecipients: + terry.reedy, rhettinger, taleinat, martin.panter, Eduardo.Seabra, cdspace, louielu, aeros
2020-09-20 07:08:04terry.reedysetmessageid: <1600585684.9.0.247059220099.issue21261@roundup.psfhosted.org>
2020-09-20 07:08:04terry.reedylinkissue21261 messages
2020-09-20 07:08:04terry.reedycreate