summaryrefslogtreecommitdiffstats
path: root/Lib/rfc822.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-11-06 14:06:48 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-11-06 14:06:48 (GMT)
commit85c20a41dfcec04d161ad7da7260e7b94c62d228 (patch)
tree0d9e5b294ab4890b72ddc61d193036ac1d4b5ca4 /Lib/rfc822.py
parentf607fc5395883ff924c76739e9b0921953568e54 (diff)
downloadcpython-85c20a41dfcec04d161ad7da7260e7b94c62d228.zip
cpython-85c20a41dfcec04d161ad7da7260e7b94c62d228.tar.gz
cpython-85c20a41dfcec04d161ad7da7260e7b94c62d228.tar.bz2
Implement and apply PEP 322, reverse iteration
Diffstat (limited to 'Lib/rfc822.py')
-rw-r--r--Lib/rfc822.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/rfc822.py b/Lib/rfc822.py
index 4f69b22..9a52a90 100644
--- a/Lib/rfc822.py
+++ b/Lib/rfc822.py
@@ -421,8 +421,7 @@ class Message:
hit = 0
if hit:
list.append(i)
- list.reverse()
- for i in list:
+ for i in reversed(list):
del self.headers[i]
def setdefault(self, name, default=""):