This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
标题: rlcompleter add "(" to callables feature
类型: enhancement Stage:
Components: Library (Lib) Versions: Python 2.6
process
状态: closed Resolution: fixed
Dependencies: 后续:
分配给: facundobatista 抄送列表: dieresys, facundobatista, georg.brandl, gpolo, pitrou, rnd0110
优先级: normal 关键字: easy, patch

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

文件
文件名 上传时间 Description 编辑
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) 日期: 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<TAB>
will give:
>>> f.fileno(_
("_" is to mark cursor position)
and:

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

msg53225 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) 日期: 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) 日期: 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) 日期: 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) 日期: 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) 日期: 2008-06-21 21:15
Here is a new patch against 2.6.
msg68646 - (view) Author: Manuel Muradás (dieresys) 日期: 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) 日期: 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) 日期: 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) 日期: 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) 日期: 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) 日期: 2008-07-02 16:53
Fixed in 64664.

Thank you everybody!
msg69906 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) 日期: 2008-07-17 20:42
This issue caused a regression in #3396.
历史
日期 用户 动作 参数
2022-04-10 16:04:18admin修改github: 34927
2008-07-17 20:42:35pitrou修改抄送: + pitrou
消息: + msg69906
2008-07-02 16:53:46facundobatista修改状态: open -> closed
resolution: fixed
消息: + msg69107
2008-06-24 18:53:07gpolo修改消息: + msg68698
2008-06-24 18:43:07dieresys修改文件: - rlcompleterAndDoc2.6.diff
2008-06-24 18:42:43dieresys修改文件: + rlcompleter2.6.diff
消息: + msg68697
2008-06-24 17:56:30gpolo修改抄送: + gpolo
消息: + msg68696
2008-06-24 17:35:40rnd0110修改消息: + msg68695
2008-06-24 04:33:49dieresys修改文件: - rlcompleter2.6.diff
2008-06-23 23:08:16facundobatista修改assignee: facundobatista
2008-06-23 20:29:49dieresys修改文件: + rlcompleterAndDoc2.6.diff
抄送: + facundobatista
消息: + msg68646
2008-06-21 21:15:15dieresys修改文件: + rlcompleter2.6.diff
抄送: + dieresys
消息: + msg68547
2008-02-19 23:14:59akuchling修改keywords: + easy
2008-02-19 23:14:13akuchling修改keywords: + patch
2001-08-08 18:04:32rnd0110创建