Skip to content

Incorrect comment in pow() documentation example #51

Description

@totolr

In the documentation for the built-in pow() function, the example comment appears to be incorrect.

Current example:

>>> pow(10, 2, 9)
1

The comment says this is "equivalent to remainder of (10**10)/9", but it should be:

# equivalent to remainder of (10**2)/9

Since the call is pow(10, 2, 9), the exponent is 2, not 10. The result checks out with the correct exponent: 10**2 = 100, and 100 % 9 = 1.

Could this comment be fixed to avoid confusing readers?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions