Skip to content

The parameter name of reversed() should be the same to avoid confusion. #137504

@hyperkai

Description

@hyperkai

The doc of reversed() says seq parameter as shown below:

reversed(seq)
Return a reverse iterator. seq must be an object which has a reversed() method or supports the sequence protocol (the len() method and the getitem() method with integer arguments starting at 0).

But the docstring of reversed() says sequence parameter as shown below:

print(help(reversed))
# class reversed(object)
#  |  reversed(sequence, /)
#  |
#  |  Return a reverse iterator over the values of the given sequence.

So, the parameter name should be the same to avoid confusion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions