[Python-checkins] r75317 - in python/branches/py3k: Demo/scripts/pi.py

georg.brandl python-checkins at python.org
Sat Oct 10 23:13:21 CEST 2009


Author: georg.brandl
Date: Sat Oct 10 23:13:21 2009
New Revision: 75317

Log:
Merged revisions 75315 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75315 | georg.brandl | 2009-10-10 23:10:05 +0200 (Sa, 10 Okt 2009) | 1 line
  
  Remove unneeded "L" suffixes.
........


Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Demo/scripts/pi.py

Modified: python/branches/py3k/Demo/scripts/pi.py
==============================================================================
--- python/branches/py3k/Demo/scripts/pi.py	(original)
+++ python/branches/py3k/Demo/scripts/pi.py	Sat Oct 10 23:13:21 2009
@@ -12,7 +12,7 @@
 
 def main():
     k, a, b, a1, b1 = 2, 4, 1, 12, 4
-    while 1:
+    while True:
         # Next approximation
         p, q, k = k*k, 2*k+1, k+1
         a, b, a1, b1 = a1, b1, p*a+q*a1, p*b+q*b1
@@ -25,7 +25,6 @@
 
 def output(d):
     # Use write() to avoid spaces between the digits
-    # Use str() to avoid the 'L'
     sys.stdout.write(str(d))
     # Flush so the output is seen immediately
     sys.stdout.flush()


More information about the Python-checkins mailing list