[Python-checkins] r64026 - in sandbox/trunk/ttk-gsoc/src: 2.x/ttk.py 3.x/ttk.py

guilherme.polo python-checkins at python.org
Sat Jun 7 22:18:55 CEST 2008


Author: guilherme.polo
Date: Sat Jun  7 22:18:54 2008
New Revision: 64026

Log:
Fixed order of precedence in the lookup method

Modified:
   sandbox/trunk/ttk-gsoc/src/2.x/ttk.py
   sandbox/trunk/ttk-gsoc/src/3.x/ttk.py

Modified: sandbox/trunk/ttk-gsoc/src/2.x/ttk.py
==============================================================================
--- sandbox/trunk/ttk-gsoc/src/2.x/ttk.py	(original)
+++ sandbox/trunk/ttk-gsoc/src/2.x/ttk.py	Sat Jun  7 22:18:54 2008
@@ -370,7 +370,7 @@
         or more states. If the default argument is set, it is used as
         a fallback value in case no specification for option is found."""
         state = ' '.join(state) if state else ''
-        option = '-' if not option.startswith('-') else '' + option
+        option = ('-' if not option.startswith('-') else '') + option
 
         return self.tk.call(self._name, "lookup", style, option, state, default)
 

Modified: sandbox/trunk/ttk-gsoc/src/3.x/ttk.py
==============================================================================
--- sandbox/trunk/ttk-gsoc/src/3.x/ttk.py	(original)
+++ sandbox/trunk/ttk-gsoc/src/3.x/ttk.py	Sat Jun  7 22:18:54 2008
@@ -370,7 +370,7 @@
         or more states. If the default argument is set, it is used as
         a fallback value in case no specification for option is found."""
         state = ' '.join(state) if state else ''
-        option = '-' if not option.startswith('-') else '' + option
+        option = ('-' if not option.startswith('-') else '') + option
 
         return self.tk.call(self._name, "lookup", style, option, state, default)
 


More information about the Python-checkins mailing list