Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDLE: use rlcompleter suffixed for completions #85069

Open
terryjreedy opened this issue Jun 6, 2020 · 2 comments
Open

IDLE: use rlcompleter suffixed for completions #85069

terryjreedy opened this issue Jun 6, 2020 · 2 comments

Comments

@terryjreedy
Copy link
Member

BPO 40892
Nosy @terryjreedy

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2020-06-06.19:23:27.509>
labels = []
title = 'IDLE: use rlcompleter suffixed for completions'
updated_at = <Date 2020-06-06.19:23:27.509>
user = 'https://github.com/terryjreedy'

bugs.python.org fields:

activity = <Date 2020-06-06.19:23:27.509>
actor = 'terry.reedy'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = []
creation = <Date 2020-06-06.19:23:27.509>
creator = 'terry.reedy'
dependencies = []
files = []
hgrepos = []
issue_num = 40892
keywords = []
message_count = 1.0
messages = ['370845']
nosy_count = 1.0
nosy_names = ['terry.reedy']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue40892'
versions = []

@terryjreedy
Copy link
Member Author

Tab completions may be suffixed with ' ' (keywords), ':' (keywords)*, or '(' (callables) if one of those is required. Ex. 'import ', 'finally:', 'len('. Attributes may get '('. The possible downside is needing to remove the suffix if one does not want the completion for what it is but as a prefix to a longer word. Ex. 'imports','elsewhere', 'length'. But this should be much less common in code.

  • 'else ' should be 'else:'

With keywords added (bpo-37765) tab list is sorted(Completer().global_match('') + list(main.dict__.keys())). Whatever decide on, calculate first part once (if not already). list.sort used preexisting order. key are sorted. builtins might be.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@terryjreedy
Copy link
Member Author

#113978 Accessing attributes can raise DeprecationWarning, as with f.code.co_lnotab. Would need to catch or use alternate fix on PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants