Skip to content

Inacurrate documentation regarding return type of math.factorial #81290

Closed

Description

@anntzer
mannequin
BPO 37109
Nosy @csabella, @tirkarthi
Superseder
  • bpo-25735: math.factorial doc should mention integer return type
  • 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 2019-05-31.09:29:34.573>
    created_at = <Date 2019-05-31.08:52:17.040>
    labels = ['3.8', 'docs']
    title = 'Inacurrate documentation regarding return type of math.factorial'
    updated_at = <Date 2019-05-31.16:44:19.565>
    user = 'https://github.com/anntzer'

    bugs.python.org fields:

    activity = <Date 2019-05-31.16:44:19.565>
    actor = 'cheryl.sabella'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2019-05-31.09:29:34.573>
    closer = 'Antony.Lee'
    components = ['Documentation']
    creation = <Date 2019-05-31.08:52:17.040>
    creator = 'Antony.Lee'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37109
    keywords = []
    message_count = 4.0
    messages = ['344039', '344046', '344048', '344090']
    nosy_count = 3.0
    nosy_names = ['docs@python', 'cheryl.sabella', 'xtreak']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '25735'
    type = None
    url = 'https://bugs.python.org/issue37109'
    versions = ['Python 3.8']

    Activity

    1. anntzer commented on May 31, 2019

      anntzermannequin
      MannequinAuthor

      https://docs.python.org/3/library/math.html says

      The following functions are provided by this module. Except when explicitly noted otherwise, all return values are floats.

      and

      math.factorial(x)
      Return x factorial. Raises ValueError if x is not integral or is negative.

      but math.factorial returns an int (which is perfectly reasonable and just needs to be documented):

      In [3]: math.factorial(5)
      Out[3]: 120

    2. tirkarthi commented on May 31, 2019

      @tirkarthi
      Member

      Is this same as bpo-25735 ?

    3. anntzer commented on May 31, 2019

      anntzermannequin
      MannequinAuthor

      oops, missed that, thanks for pointing that out.

    4. csabella commented on May 31, 2019

      @csabella
      Contributor

      Thanks for pointing out the other issue. I've now merged it.

    5. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.8 (EOL)end of lifedocsDocumentation in the Doc dir

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions