Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Discrepancy in argument naming for Sphinx docs & help in the cmath module #125957

Closed
Labels
docsDocumentation in the Doc dir
@skirpichev

Description

@skirpichev

For example, cmath.sin docslooks like:

..function::sin(x)
Return the sine of *x*.

while help() shows:

>>> help(cmath.sin)Help on built-in function sin in module cmath:sin(z, /)    Return the sine of z.

Note that help() has the "/" to show, that the parameter name is not a part of API (positional-only parameter), but the sphinx docs miss that part.

I think it's a good idea to sync parameter naming in help and sphinx. Note that the introduction in sphinx docs usesz to denote complex numbers, just as many textbooks.

Also, perPDEB decision, sphinx docs should include a slash to denote positional-only arguments. I propose instead allow positional-or-keyword arguments for functions of this module. In this way we can preserve simple (e.g.sin(z)) function signatures, while preserving "precision and completeness" of reference docs.

Linked PRs

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


      [8]ページ先頭

      ©2009-2025 Movatter.jp