[Python-checkins] r64027 - 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:32:29 CEST 2008


Author: guilherme.polo
Date: Sat Jun  7 22:32:29 2008
New Revision: 64027

Log:
Fixed order of precedence in the configure and map methods

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:32:29 2008
@@ -339,7 +339,7 @@
         Each key in kw is an option and each value is either a string or
         a sequence identifying the value for that option."""
         if query_opt:
-            query_opt = '' if query_opt.startswith('-') else '-' + query_opt
+            query_opt = ('' if query_opt.startswith('-') else '-') + query_opt
             return self.tk.call(self._name, "configure", style, query_opt)
 
         return _dict_from_tcltuple(self.tk.call(self._name, "configure", style,
@@ -355,7 +355,7 @@
         or something else of your preference. A statespec is compound of
         one or more states and then a value."""
         if query_opt:
-            query_opt = '' if query_opt.startswith('-') else '-' + query_opt
+            query_opt = ('' if query_opt.startswith('-') else '-') + query_opt
             return _list_from_statespec(self.tk.call(self._name, "map", style,
                                                      query_opt))
 

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:32:29 2008
@@ -339,7 +339,7 @@
         Each key in kw is an option and each value is either a string or
         a sequence identifying the value for that option."""
         if query_opt:
-            query_opt = '' if query_opt.startswith('-') else '-' + query_opt
+            query_opt = ('' if query_opt.startswith('-') else '-') + query_opt
             return self.tk.call(self._name, "configure", style, query_opt)
 
         return _dict_from_tcltuple(self.tk.call(self._name, "configure", style,
@@ -355,7 +355,7 @@
         or something else of your preference. A statespec is compound of
         one or more states and then a value."""
         if query_opt:
-            query_opt = '' if query_opt.startswith('-') else '-' + query_opt
+            query_opt = ('' if query_opt.startswith('-') else '-') + query_opt
             return _list_from_statespec(self.tk.call(self._name, "map", style,
                                                      query_opt))
 


More information about the Python-checkins mailing list