[Python-checkins] r63752 - in sandbox/trunk/ttk-gsoc/src: 2.x/ttk.py 3.x/ttk.py
guilherme.polo
python-checkins at python.org
Tue May 27 20:24:40 CEST 2008
Author: guilherme.polo
Date: Tue May 27 20:24:40 2008
New Revision: 63752
Log:
Made explicit what kind of values will be grouped in mapdict
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 Tue May 27 20:24:40 2008
@@ -101,8 +101,7 @@
# format it to Tcl code to denote the "normal" state
state = state[0] or '{}'
- if not isinstance(val, basestring):
- # val could be a list, tuple, etc which needs to be grouped
+ if isinstance(val, (list, tuple)): # val needs to be grouped
val = "{%s}" % ' '.join(map(str, val))
opt_val.append("%s %s" % (state, val))
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 Tue May 27 20:24:40 2008
@@ -101,8 +101,7 @@
# format it to Tcl code to denote the "normal" state
state = state[0] or '{}'
- if not isinstance(val, str):
- # val could be a list, tuple, etc which needs to be grouped
+ if isinstance(val, (list, tuple)): # val needs to be grouped
val = "{%s}" % ' '.join(map(str, val))
opt_val.append("%s %s" % (state, val))
More information about the Python-checkins
mailing list