Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inacurrate documentation regarding return type of math.factorial #81290

Closed
anntzer mannequin opened this issue May 31, 2019 · 4 comments
Closed

Inacurrate documentation regarding return type of math.factorial #81290

anntzer mannequin opened this issue May 31, 2019 · 4 comments
Labels
3.8 only security fixes docs Documentation in the Doc dir

Comments

@anntzer
Copy link
Mannequin

anntzer mannequin commented May 31, 2019

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']

    @anntzer
    Copy link
    Mannequin Author

    anntzer mannequin commented May 31, 2019

    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

    @anntzer anntzer mannequin added the 3.8 only security fixes label May 31, 2019
    @anntzer anntzer mannequin assigned docspython May 31, 2019
    @anntzer anntzer mannequin added the docs Documentation in the Doc dir label May 31, 2019
    @tirkarthi
    Copy link
    Member

    Is this same as bpo-25735 ?

    @anntzer
    Copy link
    Mannequin Author

    anntzer mannequin commented May 31, 2019

    oops, missed that, thanks for pointing that out.

    @anntzer anntzer mannequin closed this as completed May 31, 2019
    @csabella
    Copy link
    Contributor

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

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes docs Documentation in the Doc dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants