[pypy-commit] extradoc extradoc: note that C is hard.

alex_gaynor noreply at buildbot.pypy.org
Sun Jul 31 00:53:03 CEST 2011


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: extradoc
Changeset: r3860:043a2320fb40
Date: 2011-07-30 15:53 -0700
http://bitbucket.org/pypy/extradoc/changeset/043a2320fb40/

Log:	note that C is hard.

diff --git a/blog/draft/string-formatting.rst b/blog/draft/string-formatting.rst
--- a/blog/draft/string-formatting.rst
+++ b/blog/draft/string-formatting.rst
@@ -12,8 +12,10 @@
 
 Note that we had to stop for a second and consider how big numbers might get
 and overestimate the size (42 = length of the biggest number on 64bit (20) +
-1 for the sign * 2 + 1 (for the space) + 1 (NUL byte)). This is fine, except
-you can't even return ``x`` from this function, a more fair comparison might be::
+1 for the sign * 2 + 1 (for the space) + 1 (NUL byte)), it took the authors of
+this post, two experienced programs, 3 tries to get the math right on this.
+This is fine, except you can't even return ``x`` from this function, a more
+fair comparison might be::
 
     char *x = malloc(44 * sizeof(char));
     sprintf(x, "%d %d", i, i);


More information about the pypy-commit mailing list