rlcompleter not calling __getattr__ on [ ]
holger krekel
pyth at devel.trillke.net
Tue Apr 23 13:04:28 EDT 2002
On Tue, Apr 23, 2002 at 01:19:38AM -0600, Fernando P?rez wrote:
> holger krekel wrote:
> >> Currently ipython seems to do these just fine, after removing the following
> >> from the delimiters:
> >>
> >> readline_remove_delims -/'"[]{}()
> >
> > does
> >
> > b=[]
> > a=a-b.<tab>
> >
> > work then? And
> >
> > [[].<tab>
> >
> >
> > really works, too?
>
> Well, almost :)
>
> In [2]: b=[]
>
> In [3]: a=a- b.<TAB>
> b.__add__ b.__getslice__ b.__ne__ b.count
> b.__class__ b.__gt__ b.__new__ b.extend
> [snip]
:-)
i think that a proper solution should set delimiters to '' and let
rlcompleter do any interpreting magic. To be honest, what we have now
is not sufficient to handle even everyday cases.
i am starting to look into writing completer routines
which handle stuff like
a=a-[].<tab>
a=[].<tab>
a=["".<tab>
a,b,c. <tab>
a,b=c,"""()[]'""".<tab>
correctly. and maybe even
().<tab>
([abc("[]()",()).<tab>
i check back if it starts to work :-)
holger
More information about the Python-list
mailing list