mirror of
https://github.com/python/cpython.git
synced 2024-11-26 11:24:40 +08:00
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.
This commit is contained in:
parent
9376b74c42
commit
f3c5f5c044
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user