[pitivi/ges: 275/287] utils/playback.py: Comment the creation of the Seeker singleton



commit aebf798eb5449a80f75bb1f4c8ec42d678892b6e
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date:   Mon Feb 13 16:04:43 2012 -0500

    utils/playback.py: Comment the creation of the Seeker singleton

 pitivi/utils/playback.py |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/utils/playback.py b/pitivi/utils/playback.py
index 7a1b677..3cf9a33 100644
--- a/pitivi/utils/playback.py
+++ b/pitivi/utils/playback.py
@@ -37,19 +37,21 @@ class Seeker(Signallable):
     The Seeker is a singleton helper class to do various seeking
     operations in the pipeline.
     """
-
+    _instance = None
     __signals__ = {
         'seek': ['position', 'format'],
         'flush': [],
         'seek-relative': ['time'],
         'position-changed': ['position']
     }
-    _instance = None
 
     def __new__(cls, *args, **kwargs):
+        """
+        Override the new method to return the singleton instance if available.
+        Otherwise, create one.
+        """
         if not cls._instance:
-            cls._instance = super(Seeker, cls).__new__(
-                                cls, *args, **kwargs)
+            cls._instance = super(Seeker, cls).__new__(cls, *args, **kwargs)
         return cls._instance
 
     def __init__(self, timeout):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]