[Python-checkins] r63901 - in sandbox/trunk/ttk-gsoc/src: 2.x/ttk.py 3.x/ttk.py
guilherme.polo
python-checkins at python.org
Tue Jun 3 00:18:10 CEST 2008
Author: guilherme.polo
Date: Tue Jun 3 00:17:59 2008
New Revision: 63901
Log:
Simplified last fix, which will make more sense in the world uses actually.
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 Jun 3 00:17:59 2008
@@ -252,12 +252,7 @@
try: # could be the padding option, a string of ints
val = map(int, val.split())
- except AttributeError:
- try: # could be a tuple of strings (or just ints) instead
- val = map(int, val)
- except TypeError: # just keep the value as is
- pass
- except ValueError: # just keep the value as is
+ except (AttributeError, ValueError): # just keep the value as is
pass
if val and hasattr(val, "__len__") and hasattr(val[0], "typename"):
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 Jun 3 00:17:59 2008
@@ -252,12 +252,7 @@
try: # could be the padding option, a string of ints
val = list(map(int, val.split()))
- except AttributeError:
- try: # could be a tuple of strings (or just ints) instead
- val = list(map(int, val))
- except TypeError: # just keep the value as is
- pass
- except ValueError: # just keep the value as is
+ except (AttributeError, ValueError): # just keep the value as is
pass
if val and hasattr(val, "__len__") and hasattr(val[0], "typename"):
More information about the Python-checkins
mailing list