rlcompleter not calling __getattr__ on [ ]

Jaco Schieke wortelslaai at yahoo.com
Thu Apr 18 13:02:54 EDT 2002


Being new to interactive python, I have the problem that rlcompleter
does not seem to be able to resolve the items in a list:

This works as expected:
======================================
>>> import readline, atexit, rlcompleter
>>> readline.parse_and_bind('tab: complete')
>>> a=[[],"",1]
>>> a.<tab>
a.append   a.count    a.extend   a.index    a.insert   a.pop     
a.remove   a.reverse  a.sort


Now is this also supposed to work?
==================================
>>> a[0].<tab>
.   ..         <---- this is the output I receive
                     instead of the properties of an []


'cause this works:
==================================
>>> b=a[0]
>>> b.<tab>
b.append   b.count    b.extend   b.index    b.insert   b.pop     
b.remove   b.reverse  b.sort



More information about the Python-list mailing list