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

IDLE - use enumerate instead of zip(count(), ...) #47594

Closed
taleinat opened this issue Jul 11, 2008 · 7 comments
Closed

IDLE - use enumerate instead of zip(count(), ...) #47594

taleinat opened this issue Jul 11, 2008 · 7 comments
Assignees
Labels
topic-IDLE type-feature A feature request or enhancement

Comments

@taleinat
Copy link
Contributor

BPO 3344
Nosy @rhettinger, @terryjreedy, @kbkaiser, @taleinat, @devdanzin
Files
  • IDLE_EditorWindow_minor.patch: initial patch
  • 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/kbkaiser'
    closed_at = <Date 2009-08-14.13:54:22.197>
    created_at = <Date 2008-07-11.22:41:52.271>
    labels = ['expert-IDLE', 'type-feature']
    title = 'IDLE - use enumerate instead of zip(count(), ...)'
    updated_at = <Date 2009-08-14.15:08:21.790>
    user = 'https://github.com/taleinat'

    bugs.python.org fields:

    activity = <Date 2009-08-14.15:08:21.790>
    actor = 'gpolo'
    assignee = 'kbk'
    closed = True
    closed_date = <Date 2009-08-14.13:54:22.197>
    closer = 'gpolo'
    components = ['IDLE']
    creation = <Date 2008-07-11.22:41:52.271>
    creator = 'taleinat'
    dependencies = []
    files = ['10878']
    hgrepos = []
    issue_num = 3344
    keywords = ['patch']
    message_count = 7.0
    messages = ['69571', '69999', '86615', '86630', '86631', '91549', '91555']
    nosy_count = 6.0
    nosy_names = ['rhettinger', 'terry.reedy', 'kbk', 'taleinat', 'ajaksu2', 'gpolo']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = 'patch review'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue3344'
    versions = ['Python 3.1', 'Python 2.7']

    @taleinat
    Copy link
    Contributor Author

    Just minor code cleanup.

    Only one instance of zip(count(), ...) in EditorWindow.py, where I also
    changed 'file' to 'file_name' to avoid overriding the built-in 'file' class.

    @terryjreedy
    Copy link
    Member

    This looks as straightforward as patches get.
    I verified that itertools.count is not used elsewhere in the file,
    so it is ok to zap the import. Suggest apply.

    @devdanzin
    Copy link
    Mannequin

    devdanzin mannequin commented Apr 26, 2009

    +1 on committing this.

    @devdanzin devdanzin mannequin added the type-feature A feature request or enhancement label Apr 26, 2009
    @rhettinger
    Copy link
    Contributor

    I would leave the variable name unchanged.
    Also, better to use rstrip than file[0:-1].

    @gpolo
    Copy link
    Mannequin

    gpolo mannequin commented Apr 26, 2009

    I would prefer to rename it, why waste the "chance" to rename something
    badly named ?

    I agree on the rstrip use.

    @gpolo
    Copy link
    Mannequin

    gpolo mannequin commented Aug 14, 2009

    Committed on r74446, will merge into py3k.

    @gpolo gpolo mannequin closed this as completed Aug 14, 2009
    @gpolo
    Copy link
    Mannequin

    gpolo mannequin commented Aug 14, 2009

    Committed on r74446, will merge into py3k.

    py3k: r74450

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    topic-IDLE type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants