~divmod-dev/divmod.org/unique-related-addresses

Viewing all changes in revision 2688.

  • Committer: Jean-Paul Calderone
  • Date: 2011-12-22 15:40:00 UTC
  • Revision ID: exarkun@divmod.com-20111222154000-xbeaxrm3wopnt6s0
Avoid returning the same relation/address more than one for a particular part's related addresses.

Accomplished by using a set and making `EmailAddress` instances usefully hashable.

This should avoid the creation of redundant Correspondent items.  In particular, in the case
where `rfc822.AddressList` does a crummy (or great?  who knows) job of parsing an address like
"alice@example.com <alice@example.com>" into two "alice@example.com" addresses instead of one.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: