Skip to content

rlcompleter add "(" to callables feature #34927

Closed

Description

@rnd0110
mannequin
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']

    Activity

    1. rnd0110 commented on Aug 8, 2001

      rnd0110mannequin
      MannequinAuthor

      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 _
    2. added
      stdlib
      type-feature
      on Aug 8, 2001
    3. birkenfeld commented on Jul 17, 2005

      @birkenfeld
      Member

      Logged In: YES
      user_id=1188172

      Any comments on this one? Sounds reasonable to me.

    4. rnd0110 commented on Nov 9, 2006

      rnd0110mannequin
      MannequinAuthor

      Logged In: YES
      user_id=287815

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

    5. rnd0110 commented on Nov 9, 2006

      rnd0110mannequin
      MannequinAuthor

      Logged In: YES
      user_id=287815

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

    6. rnd0110 commented on Nov 9, 2006

      rnd0110mannequin
      MannequinAuthor

      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.
    7. dieresys commented on Jun 21, 2008

      dieresysmannequin
      Mannequin

      Here is a new patch against 2.6.

    8. dieresys commented on Jun 23, 2008

      dieresysmannequin
      Mannequin

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

    9. rnd0110 commented on Jun 24, 2008

      rnd0110mannequin
      MannequinAuthor

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

    10. gpolo commented on Jun 24, 2008

      gpolomannequin
      Mannequin

      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.

    11. dieresys commented on Jun 24, 2008

      dieresysmannequin
      Mannequin

      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

    12. gpolo commented on Jun 24, 2008

      gpolomannequin
      Mannequin

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


    13. facundobatista commented on Jul 2, 2008

      @facundobatista
      Member

      Fixed in 64664.

      Thank you everybody!

    14. pitrou commented on Jul 17, 2008

      @pitrou
      Member

      This issue caused a regression in bpo-3396.

    15. transferred this issue fromon Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Labels

    easystdlibtype-feature

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions