[Idle-dev] Small patch to AutoExpand.py

Tim Peters tim_one@email.msn.com
Thu, 2 Mar 2000 00:01:41 -0500


[Mark Hammond]
> While using the auto-expand feature, it struck me that it really
> should also match against builtin names.
>
> Eg, if I enter "Index" and select auto-complete, IndexError should
> appear, even if it doesnt exist in the source file.
>
> Does anyone else agree?

Guido notwithstanding <wink>, I agree.  "Complete a name" is a single
concept in my head, not helped by Emacs-like prissy distinctions attached to
yet another batch of key bindings.  The way to make this pleasant *and*
useful is to (over time) increase a single function's context awareness.

BTW, I've written word-completion pkgs for several editors that lacked the
feature, and one of the most valuable things you can do for programmers is
to search *other* open buffers for names too (e.g., picture editing a .cpp
file where a heavily used .h file is open in another buffer).  When it gets
to this stage, it's also valuable to display a status msg giving the file
name & line number of the currently-suggested completion.

every-feature-becomes-a-world-of-its-own-ly y'rs  - tim