NetKev wrote: (snip) > def process_log(self, logfile, offset): > if new_denied_hosts: > info("new denied hosts: %s", str(new_denied_hosts)) > [warn_Admin(ip) for ip in new_denied_hosts]
This uselessly builds a list. List comprehension is meant to create lists, not to replace for loops. for ip in new_denied_hosts: warn_admin(ip) -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" -- http://mail.python.org/mailman/listinfo/python-list