commit-gnue
[Top][All Lists]
Advanced

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

[gnue] r8978 - in trunk/gnue-common/src: definitions events


From: jcater
Subject: [gnue] r8978 - in trunk/gnue-common/src: definitions events
Date: Mon, 6 Nov 2006 00:39:21 -0600 (CST)

Author: jcater
Date: 2006-11-06 00:39:20 -0600 (Mon, 06 Nov 2006)
New Revision: 8978

Modified:
   trunk/gnue-common/src/definitions/GParser.py
   trunk/gnue-common/src/events/Event.py
Log:
minor namespace cleanup in events; switch to {}.iteritems() instead of 
{}.items(), as it is supposedly more correct in python2.3+

Modified: trunk/gnue-common/src/definitions/GParser.py
===================================================================
--- trunk/gnue-common/src/definitions/GParser.py        2006-11-05 22:41:57 UTC 
(rev 8977)
+++ trunk/gnue-common/src/definitions/GParser.py        2006-11-06 06:39:20 UTC 
(rev 8978)
@@ -457,7 +457,7 @@
             # self.uniqueIDs ["%s" % qattr_data] = True
 
 
-      for attr, attrdata in baseAttrs.items():
+      for attr, attrdata in baseAttrs.iteritems():
         try:
           if not attr in lattrs:
             # Pull default values for missing attributes

Modified: trunk/gnue-common/src/events/Event.py
===================================================================
--- trunk/gnue-common/src/events/Event.py       2006-11-05 22:41:57 UTC (rev 
8977)
+++ trunk/gnue-common/src/events/Event.py       2006-11-06 06:39:20 UTC (rev 
8978)
@@ -69,7 +69,7 @@
 
         self.__dict__.update (parms)
 
-        # TODO: Get rid of data=    
+        # TODO: Get rid of data=
         self.data          = data
 
         self.__event__     = event
@@ -136,8 +136,8 @@
         """
 
         return self.__event__
-    
-    
+
+
     event = property(getEvent, None)
 
 
@@ -168,7 +168,7 @@
         self.__errortext__ = text
 
 
-    def getError(self): 
+    def getError(self):
         return self.__error__ and (self.__errortext__ or 'Unnamed Error') or 
None
 
 
@@ -179,7 +179,7 @@
     # Add an event to the event queue
     # 
---------------------------------------------------------------------------
 
-    def dispatchAfter (self, *args, **parms):
+    def dispatch_after (self, *args, **parms):
         """
         Adds an event to the event queue that will be dispatched upon this 
events
         completion. The arguments to this function match those used in 
creating an
@@ -190,6 +190,8 @@
         >>> from gnue.common.events.Event import *
         >>> myEvent = Event ('myEventName', color = 'Blue', x = 1, y = 2)
         >>> myEvent.dispatchAfter ('theNextEvent', name = 'FSF')
-        """    
+        """
 
         self.__after__.append ((args, parms))
+
+    dispatchAfter = dispatch_after
\ No newline at end of file





reply via email to

[Prev in Thread] Current Thread [Next in Thread]