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

enumerate() docstring doesn't cover optional start argument #52881

Closed
ncoghlan opened this issue May 6, 2010 · 3 comments
Closed

enumerate() docstring doesn't cover optional start argument #52881

ncoghlan opened this issue May 6, 2010 · 3 comments
Labels
easy interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@ncoghlan
Copy link
Contributor

ncoghlan commented May 6, 2010

BPO 8635
Nosy @birkenfeld, @ncoghlan, @durban
Files
  • issue8635.diff: Patch (py3k branch)
  • 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 = None
    closed_at = <Date 2010-05-22.11:43:37.485>
    created_at = <Date 2010-05-06.13:16:03.078>
    labels = ['interpreter-core', 'easy', 'type-bug']
    title = "enumerate() docstring doesn't cover optional start argument"
    updated_at = <Date 2010-05-22.11:43:37.483>
    user = 'https://github.com/ncoghlan'

    bugs.python.org fields:

    activity = <Date 2010-05-22.11:43:37.483>
    actor = 'georg.brandl'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-05-22.11:43:37.485>
    closer = 'georg.brandl'
    components = ['Interpreter Core']
    creation = <Date 2010-05-06.13:16:03.078>
    creator = 'ncoghlan'
    dependencies = []
    files = ['17271']
    hgrepos = []
    issue_num = 8635
    keywords = ['patch', 'easy']
    message_count = 3.0
    messages = ['105144', '105377', '106301']
    nosy_count = 3.0
    nosy_names = ['georg.brandl', 'ncoghlan', 'daniel.urban']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'needs patch'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue8635'
    versions = ['Python 2.7', 'Python 3.2']

    @ncoghlan
    Copy link
    Contributor Author

    ncoghlan commented May 6, 2010

    As noted in the comments for bpo-2831, the enumerate docstring doesn't cover the feature added by that patch.

    @ncoghlan ncoghlan added interpreter-core (Objects, Python, Grammar, and Parser dirs) easy type-bug An unexpected behavior, bug, or error labels May 6, 2010
    @durban
    Copy link
    Mannequin

    durban mannequin commented May 9, 2010

    Attached a patch. It changes the docstring to:
    "enumerate(iterable[, start]) -> iterator for index, value of iterable

    Return an enumerate object. iterable must be another object that supports
    iteration, start must be an integer (defaults to 0). The enumerate object
    yields pairs containing a count (from start) and a value yielded by the
    iterable argument. enumerate is useful for obtaining an indexed list:
    (0, seq[0]), (1, seq[1]), (2, seq[2]), ..."

    @birkenfeld
    Copy link
    Member

    Thanks, fixed in r81468 with a slightly different patch.

    @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
    easy interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants