[Mailman-Developers] [Mailman-checkins] [Branch ~mailman-coders/mailman/2.1]

Barry Warsaw barry at list.org
Mon Nov 19 14:24:39 CET 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Nov 18, 2007, at 10:38 PM, Mark Sapiro wrote:

>>> === modified file 'Mailman/versions.py'
>>> --- a/Mailman/versions.py	2005-12-30 18:50:08 +0000
>>> +++ b/Mailman/versions.py	2007-10-05 01:35:10 +0000
>>> @@ -483,10 +483,11 @@
>>>              # blow away the original timestamp and request id.
>>> This means the
>>>              # request will live a little longer than it possibly
>>> should have,
>>>              # but that's no big deal.
>>> +            import email
>>>              for p in v:
>>>                  author, text = p[2]
>>>                  reason = p[3]
>>> -                msg = Message.OutgoingMessage(text)
>>> +                msg = email.message_from_string(text,
>>> Message.Message)
>>>                  l.HoldMessage(msg, reason)
>>>              del r[k]
>>>          elif k == 'add_member':
>>
>> Should the import happen at the module global level?
>
>
> I thought about that. Our standards of course say yes, but this
> particular import only occurs when updating a Mailman 1.0.x list  
> which I
> hope happens very infrequently. However I don't really feel strongly
> either way.

Ultimately it's a style issue.  I'm nearly positive that it will make  
no significant different in performance.  Generally I like to have  
function scope imports only when necessary (e.g. to avoid circular  
import problems).  But I'll leave it up to you to change or not.

Cheers,
- -Barry

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFHQY6X2YZpQepbvXERAlNpAJ91ZKrl0gWY5r+l0OoPhwasBY0YHACgo/38
1QGhKpAIyf8gPgY0mCJIm6o=
=z8gz
-----END PGP SIGNATURE-----


More information about the Mailman-Developers mailing list