[issue13933] IDLE:not able to complete the hashlib module

Terry J. Reedy report at bugs.python.org
Sat Feb 4 04:39:57 CET 2012


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Ramchandra: what OS and Python version? Please always include in reports.

I verified on win7,3.2.2, with hashlib versus itertools, idlelib, heapq, trace. (On my new machine, popup is so fast I do not need <tab>.) In fact, 'hashlib.' and <tab> results in a tab to next tab position. ^<space> to <show completions> also does not work, but it does without the '.'. Some files (only builtins?) work without being imported. Everything seemed to work the same in an edit window.

hashlib.__all__ exists as a tuple. Modules without .__all__ also work.
Both cases are handled in idlelib.AutoComplete.fetch_completions().
I see nothing strange about hashlib.

Looking at idlelib.AutoComplete.py, I see other problems to fix.

"This extension can complete either attribute names of file names."
/of/or/, but ^<sp> in name brings up globals list with cursor at closest name to what one has entered. Are these handled elsewhere?

# This string includes all chars that may be in a file name (without a path
# separator)
FILENAME_CHARS = string.ascii_letters + string.digits + os.curdir + "._~#$:-"
# This string includes all chars that may be in an identifier
ID_CHARS = string.ascii_letters + string.digits + "_"

FILENAME_CHARS looks Windows specific. Both definitions are obsolete. IDLE should not separately define such things if at all possible.

But 'hash' is not in the file and I see little specific to the text context. Without being able to insert print calls to see what is and is not executed, I have no idea how to proceed.

----------
nosy: +serwy, terry.reedy
versions: +Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13933>
_______________________________________


More information about the Python-bugs-list mailing list