[Python-ideas] Small nice addition to rlcompleter

Roman Susi rnd at onego.ru
Tue Jun 24 19:41:54 CEST 2008


hi!

I had that proposal (stated back in 2001 here
http://bugs.python.org/issue449227 ), with these main moments to cite
myself:

<<<
I use rlcompleter extensively in interactive Python
mode.
I think it could be cool if callable objects were added
"("
when completed. This way it will be much faster to
program, without looking-up __doc__. For example:

>>> f.fil<TAB>
will give:
>>> f.fileno(_
("_" is to mark cursor position)
and:

>>> f.so<TAB>
will (as before) give:
>>> f.softspace _


One more illustration:

>>> f = open("myfile", "w")
>>> f.
f.__class__(         f.__repr__(          f.next(
f.__delattr__(       f.__setattr__(       f.read(
f.__doc__            f.__str__(           f.readinto(
f.__enter__(         f.close(             f.readline(
f.__exit__(          f.closed             f.readlines(
f.__getattribute__(  f.encoding           f.seek(
f.__hash__(          f.fileno(            f.softspace
f.__init__(          f.flush(             f.tell(
f.__iter__(          f.isatty(            f.truncate(
f.__new__(           f.mode               f.write(
f.__reduce__(        f.name               f.writelines(
f.__reduce_ex__(     f.newlines           f.xreadlines(
>>> f.


- nice to remember which attributes are methods and which
aren't.

>>>


There are patches recently made by Manuel Muradás and Facundo Batista
for 2.6 (so I assume some people are interested in the patch, not only
me), but I have no idea how (and if) it ever gets into Python? 2.6 and 3k.

Its a very small feature to make a PEP, but how then? I hope rlcompleter
will not get obsoleted before the patch is accepted ;-)

Thanks!

Regards,
Roman




More information about the Python-ideas mailing list