[Python-checkins] r71464 - python/branches/py3k-short-float-repr/Python/pystrtod.c

mark.dickinson python-checkins at python.org
Sat Apr 11 13:40:02 CEST 2009


Author: mark.dickinson
Date: Sat Apr 11 13:40:01 2009
New Revision: 71464

Log:
We never add a sign for a NaN.  Add comment to make it clear
that this was a deliberate decision.


Modified:
   python/branches/py3k-short-float-repr/Python/pystrtod.c

Modified: python/branches/py3k-short-float-repr/Python/pystrtod.c
==============================================================================
--- python/branches/py3k-short-float-repr/Python/pystrtod.c	(original)
+++ python/branches/py3k-short-float-repr/Python/pystrtod.c	Sat Apr 11 13:40:01 2009
@@ -594,6 +594,8 @@
 			p += 3;
 		}
 		else if (digits[0] == 'n' || digits[0] == 'N') {
+			/* note that we *never* add a sign for a nan,
+			   even if one has explicitly been requested */
 			strncpy(p, float_strings[OFS_NAN], 3);
 			p += 3;
 		}


More information about the Python-checkins mailing list