use magic instead of readable code
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Thu, 26 Jan 2006 13:15:57 +0000 (13:15 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Thu, 26 Jan 2006 13:15:57 +0000 (13:15 +0000)
timer.py

index 169d329..c03eb1e 100644 (file)
--- a/timer.py
+++ b/timer.py
@@ -114,11 +114,7 @@ class Timer:
                        f(entry)
                        
        def cleanup(self):
-               new_processed_timers = []
-               for x in self.processed_timers:
-                       if x.disabled:
-                               new_processed_timers.append(x)
-               self.processed_timers = new_processed_timers
+               self.processed_timers = [entry for entry in self.processed_timers if entry.disabled]
        
        def addTimerEntry(self, entry, noRecalc=0):
                entry.processRepeated()