Skip to content

Missing "/" in function signatures of the rst docs of stdlib (e.g. the math module) #101118

@skirpichev

Description

@skirpichev

after PEP 570, there is a syntax to specify positional-only parameters in the function definition. Unfortunately, most stdlib modules ignore this (the os module seems to be an exception). The math module is an example. While

>>> inspect.signature(math.ceil)
<Signature (x, /)>

the module docs display the function signature as math.ceil(x), that is wrong:

>>> math.ceil(x=3.14)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: math.ceil() takes no keyword arguments

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy