Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rlcompleter add "(" to callables feature #34927

Closed
rnd0110 mannequin opened this issue Aug 8, 2001 · 13 comments
Closed

rlcompleter add "(" to callables feature #34927

rnd0110 mannequin opened this issue Aug 8, 2001 · 13 comments
Assignees
Labels
easy stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@rnd0110
Copy link
Mannequin

rnd0110 mannequin commented Aug 8, 2001

BPO 449227
Nosy @birkenfeld, @facundobatista, @pitrou
Files
  • rlcompleter.py: rlcompleter.py which does it for Python2.5
  • rlcompleter.diff: patch to rlcompleter which does almost as described
  • rlcompleter2.6.diff: rlcompleter adds "(" to callables in 2.6 and documentation
  • 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']

    @rnd0110
    Copy link
    Mannequin Author

    rnd0110 mannequin commented Aug 8, 2001

    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 _

    @rnd0110 rnd0110 mannequin added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Aug 8, 2001
    @birkenfeld
    Copy link
    Member

    Logged In: YES
    user_id=1188172

    Any comments on this one? Sounds reasonable to me.

    @rnd0110
    Copy link
    Mannequin Author

    rnd0110 mannequin commented Nov 9, 2006

    Logged In: YES
    user_id=287815

    Perhaps one needs to propose a patch. Otherwise it will not
    advance...

    @rnd0110
    Copy link
    Mannequin Author

    rnd0110 mannequin commented Nov 9, 2006

    Logged In: YES
    user_id=287815

    Wow! The patch is here! Why isn't is accepted into the
    distribution???

    @rnd0110
    Copy link
    Mannequin Author

    rnd0110 mannequin commented Nov 9, 2006

    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.

    @dieresys
    Copy link
    Mannequin

    dieresys mannequin commented Jun 21, 2008

    Here is a new patch against 2.6.

    @dieresys
    Copy link
    Mannequin

    dieresys mannequin commented Jun 23, 2008

    I have also updated the rlcompleter documentation. Here is the complete
    patch.
    rlcompleterAndDoc2.6.diff

    @rnd0110
    Copy link
    Mannequin Author

    rnd0110 mannequin commented Jun 24, 2008

    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?)

    @gpolo
    Copy link
    Mannequin

    gpolo mannequin commented Jun 24, 2008

    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.

    @dieresys
    Copy link
    Mannequin

    dieresys mannequin commented Jun 24, 2008

    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

    @gpolo
    Copy link
    Mannequin

    gpolo mannequin commented Jun 24, 2008

    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\>


    @facundobatista
    Copy link
    Member

    Fixed in 64664.

    Thank you everybody!

    @pitrou
    Copy link
    Member

    pitrou commented Jul 17, 2008

    This issue caused a regression in bpo-3396.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    easy stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants