[Python-checkins] peps: PEP 475: Fix Hello World example
victor.stinner
python-checkins at python.org
Thu Jul 24 22:33:31 CEST 2014
http://hg.python.org/peps/rev/c499dee43fdd
changeset: 5504:c499dee43fdd
user: Victor Stinner <victor.stinner at gmail.com>
date: Thu Jul 24 22:33:23 2014 +0200
summary:
PEP 475: Fix Hello World example
files:
pep-0475.txt | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/pep-0475.txt b/pep-0475.txt
--- a/pep-0475.txt
+++ b/pep-0475.txt
@@ -99,8 +99,9 @@
while True:
try:
print("Hello World")
+ break
except InterruptedError:
- pass
+ continue
``InterruptedError`` can happen in unexpected places. For example,
``os.close()`` and ``FileIO.close()`` can raises ``InterruptedError``:
--
Repository URL: http://hg.python.org/peps
More information about the Python-checkins
mailing list