[Python-checkins] python/nondist/peps pep-0343.txt,1.13,1.14
gvanrossum@users.sourceforge.net
gvanrossum at users.sourceforge.net
Wed May 18 05:58:41 CEST 2005
Update of /cvsroot/python/python/nondist/peps
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1575
Modified Files:
pep-0343.txt
Log Message:
Outdent "return +s" and explain why. Thanks Raymond!
Index: pep-0343.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0343.txt,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- pep-0343.txt 18 May 2005 02:53:26 -0000 1.13
+++ pep-0343.txt 18 May 2005 03:58:29 -0000 1.14
@@ -414,7 +414,9 @@
num *= x * x
sign *= -1
s += num / fact * sign
- return +s
+ # The "+s" rounds back to the original precision,
+ # so this must be outside the do-statement:
+ return +s
An alternative version of the generator saves the entire
context instead of just the precision attribute. This is more
More information about the Python-checkins
mailing list