classification
Title: Add math.isfinite()
Type: enhancement Stage: resolved
Components: Extension Modules Versions: Python 3.2
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: mark.dickinson Nosy List: benjamin.peterson, eric.smith, mark.dickinson
Priority: low Keywords: patch

Created on 2010-07-05 15:16 by benjamin.peterson, last changed 2010-07-11 17:39 by mark.dickinson. This issue is now closed.

Files
File name Uploaded Description Edit
isfinite.patch mark.dickinson, 2010-07-05 15:26
isfinite_v2.patch mark.dickinson, 2010-07-05 15:49
Messages (6)
msg109324 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2010-07-05 15:16
It would be equivalent to "not isinf(x) and not isnan(x)".
msg109326 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-07-05 15:26
+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.
msg109328 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-07-05 15:43
Version 2 of patch adds cmath.isfinite, and changes doc markup to use ``True`` instead of :const:`True`  (thanks Benjamin!).
msg109330 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2010-07-05 15:51
Looks good to me.
msg109356 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2010-07-05 21:26
+1 from me, too.

You might want to reference this issue in the Misc/NEWS entry.
msg110030 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-07-11 17:39
Applied in r82818 (with issue number added to Misc/NEWS;  thanks, Eric!).
History
Date User Action Args
2010-07-11 17:39:35mark.dickinsonsetstatus: open -> closed
resolution: accepted
messages: + msg110030

stage: patch review -> resolved
2010-07-05 21:26:53eric.smithsetnosy: + eric.smith
messages: + msg109356
2010-07-05 15:51:36benjamin.petersonsetmessages: + msg109330
2010-07-05 15:49:16mark.dickinsonsetfiles: - isfinite_v2.patch
2010-07-05 15:49:11mark.dickinsonsetfiles: + isfinite_v2.patch
2010-07-05 15:43:42mark.dickinsonsetfiles: + isfinite_v2.patch

messages: + msg109328
2010-07-05 15:26:37mark.dickinsonsetfiles: + isfinite.patch

type: enhancement
assignee: mark.dickinson

keywords: + patch
nosy: + mark.dickinson
messages: + msg109326
stage: patch review
2010-07-05 15:16:47benjamin.petersoncreate