[Mailman-Developers] Multiple dicts containing subscribers within MailList pickle?

Andrew A. Raines aaraines at pobox.com
Thu Oct 9 14:24:17 EDT 2003


Greetings,

I'm new to Mailman development, so bear with me.  I didn't see
anything in the archives addressing this, but my searches weren't
too complex.

There's probably good reason for this design, but why have
multiple dicts within the MailList infrastructure duplicating
the subscriber list?

   In [config.pck]:

   'passwords': { 'sub1 at foo.dom': 'pass',
                  'sub2 at foo.dom': 'pass' }
   'members': { 'sub1 at foo.dom': 0,
                'sub2 at foo.dom': 0 }
   'usernames': { 'sub1 at foo.dom': u'Subscriber One!',
                  'sub2 at foo.dom': u'Subscriber Two!' }
   'user_options: { 'sub1 at foo.dom': 264,
                    'sub2 at foo.dom': 392 }

Seems like it would be more straightforward (in design, at
least; maybe not in practice) to store it with nested dicts like:

   'subscribers': { 'sub1 at foo.dom': { 'password': 'pass',
                                      'digest': 0,
                                      'username': u'Subscriber One!',
                                      'options': 264 }
                    'sub2 at foo.dom': { 'password': 'pass',
                                      'digest': 1,
                                      'username': u'Subscriber Two!',
                                      'options': 392 }
                  }

There tends to be more consistency with this approach than, for
instance, having a members dict *and* a digest_members dict
which could each be empty.  Why not just toggle a subvalue
within a master subscriber database dict?

Thanks,

-Drew




More information about the Mailman-Developers mailing list