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

Missing (optional) argument start and end in documentation for list.index #66188

Closed
SylvainDe mannequin opened this issue Jul 16, 2014 · 2 comments
Closed

Missing (optional) argument start and end in documentation for list.index #66188

SylvainDe mannequin opened this issue Jul 16, 2014 · 2 comments
Labels
docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@SylvainDe
Copy link
Mannequin

SylvainDe mannequin commented Jul 16, 2014

BPO 21989
Nosy @ezio-melotti, @bitdancer, @SylvainDe
Files
  • list_index_start_end.patch: Simple patch to document the function signature
  • 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 2014-07-18.21:03:36.894>
    created_at = <Date 2014-07-16.12:40:19.069>
    labels = ['type-feature', 'invalid', 'docs']
    title = 'Missing (optional) argument `start` and `end` in documentation for list.index'
    updated_at = <Date 2014-07-18.21:03:36.893>
    user = 'https://github.com/SylvainDe'

    bugs.python.org fields:

    activity = <Date 2014-07-18.21:03:36.893>
    actor = 'r.david.murray'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2014-07-18.21:03:36.894>
    closer = 'r.david.murray'
    components = ['Documentation']
    creation = <Date 2014-07-16.12:40:19.069>
    creator = 'SylvainDe'
    dependencies = []
    files = ['35967']
    hgrepos = []
    issue_num = 21989
    keywords = ['patch']
    message_count = 2.0
    messages = ['223195', '223434']
    nosy_count = 4.0
    nosy_names = ['ezio.melotti', 'r.david.murray', 'docs@python', 'SylvainDe']
    pr_nums = []
    priority = 'normal'
    resolution = 'not a bug'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue21989'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5']

    @SylvainDe
    Copy link
    Mannequin Author

    SylvainDe mannequin commented Jul 16, 2014

    From :

    https://docs.python.org/2/tutorial/datastructures.html and
    https://docs.python.org/3.4/tutorial/datastructures.html (and all other versions) :

    ----------------------------

        list.index(x)
        Return the index in the list of the first item whose value is x. It is an error if there is no such item.
    

    ----------------------------

    From help(list) :

    ----------------------------
    | index(...)
    | L.index(value, [start, [stop]]) -> integer -- return first index of value.
    | Raises ValueError if the value is not present.
    ----------------------------

    Thus, second and third parameter are undocumented.

    @SylvainDe SylvainDe mannequin assigned docspython Jul 16, 2014
    @SylvainDe SylvainDe mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Jul 16, 2014
    @bitdancer
    Copy link
    Member

    It's a tutorial, not API documentation. You will note that the 'key' and 'reverse' arguments to sort are not mentioned either.

    @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
    docs Documentation in the Doc dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant