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

Add math.isfinite() #53411

Closed
benjaminp opened this issue Jul 5, 2010 · 6 comments
Closed

Add math.isfinite() #53411

benjaminp opened this issue Jul 5, 2010 · 6 comments
Assignees
Labels
extension-modules C modules in the Modules dir type-feature A feature request or enhancement

Comments

@benjaminp
Copy link
Contributor

BPO 9165
Nosy @mdickinson, @ericvsmith, @benjaminp
Files
  • isfinite.patch
  • isfinite_v2.patch
  • 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 = 'https://github.com/mdickinson'
    closed_at = <Date 2010-07-11.17:39:35.697>
    created_at = <Date 2010-07-05.15:16:47.890>
    labels = ['extension-modules', 'type-feature']
    title = 'Add math.isfinite()'
    updated_at = <Date 2010-07-11.17:39:35.696>
    user = 'https://github.com/benjaminp'

    bugs.python.org fields:

    activity = <Date 2010-07-11.17:39:35.696>
    actor = 'mark.dickinson'
    assignee = 'mark.dickinson'
    closed = True
    closed_date = <Date 2010-07-11.17:39:35.697>
    closer = 'mark.dickinson'
    components = ['Extension Modules']
    creation = <Date 2010-07-05.15:16:47.890>
    creator = 'benjamin.peterson'
    dependencies = []
    files = ['17867', '17870']
    hgrepos = []
    issue_num = 9165
    keywords = ['patch']
    message_count = 6.0
    messages = ['109324', '109326', '109328', '109330', '109356', '110030']
    nosy_count = 3.0
    nosy_names = ['mark.dickinson', 'eric.smith', 'benjamin.peterson']
    pr_nums = []
    priority = 'low'
    resolution = 'accepted'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue9165'
    versions = ['Python 3.2']

    @benjaminp
    Copy link
    Contributor Author

    It would be equivalent to "not isinf(x) and not isnan(x)".

    @benjaminp benjaminp added the extension-modules C modules in the Modules dir label Jul 5, 2010
    @mdickinson
    Copy link
    Member

    +1. This is natural counterpart to math.isinf and math.isnan. In fact, it's quite surprising to have those two functions available and not math.isfinite.

    Here's a patch.

    @mdickinson mdickinson self-assigned this Jul 5, 2010
    @mdickinson mdickinson added the type-feature A feature request or enhancement label Jul 5, 2010
    @mdickinson
    Copy link
    Member

    Version 2 of patch adds cmath.isfinite, and changes doc markup to use ``True`` instead of :const:`True` (thanks Benjamin!).

    @benjaminp
    Copy link
    Contributor Author

    Looks good to me.

    @ericvsmith
    Copy link
    Member

    +1 from me, too.

    You might want to reference this issue in the Misc/NEWS entry.

    @mdickinson
    Copy link
    Member

    Applied in r82818 (with issue number added to Misc/NEWS; thanks, Eric!).

    @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
    extension-modules C modules in the Modules dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants