Issue 449227: rlcompleter add "(" to callables feature (original) (raw)

Issue449227

Created on 2001-08-08 18:04 by rnd0110, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
rlcompleter.diff rnd0110,2001-08-08 18:47 patch to rlcompleter which does almost as described
rlcompleter.py rnd0110,2006-11-09 07:53 rlcompleter.py which does it for Python2.5
rlcompleter2.6.diff dieresys,2008-06-24 18:42 rlcompleter adds "(" to callables in 2.6 and documentation
Messages (13)
msg53224 - (view) Author: Roman Suzi (rnd0110) Date: 2001-08-08 18:04
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 will give: >>> f.fileno(_ ("_" is to mark cursor position) and: >>> f.so will (as before) give: >>> f.softspace _
msg53225 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2005-07-17 13:15
Logged In: YES user_id=1188172 Any comments on this one? Sounds reasonable to me.
msg53226 - (view) Author: Roman Suzi (rnd0110) Date: 2006-11-09 06:58
Logged In: YES user_id=287815 Perhaps one needs to propose a patch. Otherwise it will not advance...
msg53227 - (view) Author: Roman Suzi (rnd0110) Date: 2006-11-09 07:01
Logged In: YES user_id=287815 Wow! The patch is here! Why isn't is accepted into the distribution???
msg53228 - (view) Author: Roman Suzi (rnd0110) Date: 2006-11-09 07:57
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.
msg68547 - (view) Author: Manuel Muradás (dieresys) Date: 2008-06-21 21:15
Here is a new patch against 2.6.
msg68646 - (view) Author: Manuel Muradás (dieresys) Date: 2008-06-23 20:29
I have also updated the rlcompleter documentation. Here is the complete patch. rlcompleterAndDoc2.6.diff
msg68695 - (view) Author: Roman Suzi (rnd0110) Date: 2008-06-24 17:35
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?)
msg68696 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2008-06-24 17:56
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.
msg68697 - (view) Author: Manuel Muradás (dieresys) Date: 2008-06-24 18:42
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
msg68698 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2008-06-24 18:53
On Tue, Jun 24, 2008 at 3:42 PM, Manuel Muradás <report@bugs.python.org> wrote: > > Manuel Muradás <mmuradas@dieresys.com.ar> 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 <report@bugs.python.org> > <http://bugs.python.org/issue449227> > _______________________________________ >
msg69107 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2008-07-02 16:53
Fixed in 64664. Thank you everybody!
msg69906 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-07-17 20:42
This issue caused a regression in #3396.
History
Date User Action Args
2022-04-10 16:04:18 admin set github: 34927
2008-07-17 20:42:35 pitrou set nosy: + pitroumessages: +
2008-07-02 16:53:46 facundobatista set status: open -> closedresolution: fixedmessages: +
2008-06-24 18:53:07 gpolo set messages: +
2008-06-24 18:43:07 dieresys set files: - rlcompleterAndDoc2.6.diff
2008-06-24 18:42:43 dieresys set files: + rlcompleter2.6.diffmessages: +
2008-06-24 17:56:30 gpolo set nosy: + gpolomessages: +
2008-06-24 17:35:40 rnd0110 set messages: +
2008-06-24 04:33:49 dieresys set files: - rlcompleter2.6.diff
2008-06-23 23:08:16 facundobatista set assignee: facundobatista
2008-06-23 20:29:49 dieresys set files: + rlcompleterAndDoc2.6.diffnosy: + facundobatistamessages: +
2008-06-21 21:15:15 dieresys set files: + rlcompleter2.6.diffnosy: + dieresysmessages: +
2008-02-19 23:14:59 akuchling set keywords: + easy
2008-02-19 23:14:13 akuchling set keywords: + patch
2001-08-08 18:04:32 rnd0110 create