summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-09-15 22:15:23 (GMT)
committerGuido van Rossum <guido@python.org>1999-09-15 22:15:23 (GMT)
commitf3c5f5c044376f96feebc6458f1212170b936d9a (patch)
tree3176ff9b40040f6b799e58fa9fd188725807c323
parent9376b74c42d3d7361330c7a28d4ac65b6ace6cfb (diff)
downloadcpython-f3c5f5c044376f96feebc6458f1212170b936d9a.zip
cpython-f3c5f5c044376f96feebc6458f1212170b936d9a.tar.gz
cpython-f3c5f5c044376f96feebc6458f1212170b936d9a.tar.bz2
After much hemming and hawing, we decided to roll back Fred's change.
It breaks Mailman, it was actually documented in the docstring, so it was an intentional deviation from the usual del semantics. Let's document the original behavior in Doc/lib/librfc822.tex.
-rw-r--r--Lib/rfc822.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/rfc822.py b/Lib/rfc822.py
index dcf059c..8721994 100644
--- a/Lib/rfc822.py
+++ b/Lib/rfc822.py
@@ -397,11 +397,11 @@ class Message:
def __delitem__(self, name):
"""Delete all occurrences of a specific header, if it is present."""
- lowname = string.lower(name)
- if not self.dict.has_key(lowname):
- raise KeyError, name
- del self.dict[lowname]
- name = lowname + ':'
+ name = string.lower(name)
+ if not self.dict.has_key(name):
+ return
+ del self.dict[name]
+ name = name + ':'
n = len(name)
list = []
hit = 0