Auto-Archiving, and Unread Threshold Alert

Marco Colombo marco at esi.it
Wed May 11 09:20:48 EDT 2005


On Wed, 2005-05-11 at 14:38 +0200, Marco Colombo wrote:
[...]
> for user in users:
>     mesgs = check_one(user)
>     if mesgs:
>         print "user %s has %d messages." % (user, len(check_one(user)))
                                                        ^^^^^^^^^^^^^^^

Well, make the last line look like this, there's no need to check the
same user twice:

          print "user %s has %d messages." % (user, len(mesgs)) 


.TM.
-- 
      ____/  ____/   /
     /      /       /                   Marco Colombo
    ___/  ___  /   /                  Technical Manager
   /          /   /                      ESI s.r.l.
 _____/ _____/  _/                      Colombo at ESI.it

---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list