diff options
-rw-r--r-- | Lib/rfc822.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/rfc822.py b/Lib/rfc822.py index ade3506..87d7d39 100644 --- a/Lib/rfc822.py +++ b/Lib/rfc822.py @@ -728,6 +728,10 @@ class AddressList(AddrlistClass): newaddr.addresslist.append(x) return newaddr + def __getitem__(self, index): + # Make indexing, slices, and 'in' work + return self.addrlist[index] + def dump_address_pair(pair): """Dump a (name, address) pair in a canonicalized form.""" if pair[0]: |