rlcompleter add "(" to callables feature
| BPO | 449227 |
|---|---|
| Nosy | @birkenfeld, @facundobatista, @pitrou |
| Files |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = 'https://github.com/facundobatista'
closed_at = <Date 2008-07-02.16:53:46.832>
created_at = <Date 2001-08-08.18:04:32.000>
labels = ['easy', 'type-feature', 'library']
title = 'rlcompleter add "(" to callables feature'
updated_at = <Date 2008-07-17.20:42:35.016>
user = 'https://bugs.python.org/rnd0110'
bugs.python.org fields:
activity = <Date 2008-07-17.20:42:35.016>
actor = 'pitrou'
assignee = 'facundobatista'
closed = True
closed_date = <Date 2008-07-02.16:53:46.832>
closer = 'facundobatista'
components = ['Library (Lib)']
creation = <Date 2001-08-08.18:04:32.000>
creator = 'rnd0110'
dependencies = []
files = ['8188', '8189', '10721']
hgrepos = []
issue_num = 449227
keywords = ['patch', 'easy']
message_count = 13.0
messages = ['53224', '53225', '53226', '53227', '53228', '68547', '68646', '68695', '68696', '68697', '68698', '69107', '69906']
nosy_count = 6.0
nosy_names = ['georg.brandl', 'facundobatista', 'rnd0110', 'pitrou', 'gpolo', 'dieresys']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue449227'
versions = ['Python 2.6']
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 _
Logged In: YES user_id=1188172
Any comments on this one? Sounds reasonable to me.
Logged In: YES user_id=287815
Perhaps one needs to propose a patch. Otherwise it will not advance...
Logged In: YES user_id=287815
Wow! The patch is here! Why isn't is accepted into the distribution???
Logged In: YES user_id=287815
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.
Here is a new patch against 2.6.
I have also updated the rlcompleter documentation. Here is the complete patch. rlcompleterAndDoc2.6.diff
Thanks for the patch!
However, I do not understand if it ever gets included into Python or remains always for those who find it? (I do not believe this small change is somehow PEPable, but how it gets included then?)
This is nearly good. But I have some notes: you don't need to import operator here, just use the built-in callable; stick to <80 columns; leave a space after a comma.
Guilherme, Thanks a lot for taking some time to review my patch. Here is a new version.
Please take another look and tell me what do you think about it. Thanks again
On Tue, Jun 24, 2008 at 3:42 PM, Manuel Muradás <[email protected]> wrote:
Manuel Muradás <[email protected]> added the comment:
Guilherme, Thanks a lot for taking some time to review my patch. Here is a new version.
Please take another look and tell me what do you think about it. Thanks again
That is good to be applied now.
Added file: http://bugs.python.org/file10721/rlcompleter2.6.diff
Python tracker <[email protected]> <http://bugs.python.org/issue449227>
Fixed in 64664.
Thank you everybody!
This issue caused a regression in bpo-3396.