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

guilherme.polo python-checkins at python.org
Thu Sep 4 20:42:45 CEST 2008


Author: guilherme.polo
Date: Thu Sep  4 20:42:44 2008
New Revision: 66222

Log:
Removed some repeated comments in Combobox

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	Thu Sep  4 20:42:44 2008
@@ -692,8 +692,9 @@
             exportselection, justify, height, postcommand, state,
             textvariable, values, width
         """
+        # The "values" option may need special formatting, so leave to
+        # _format_optdict the responsability to format it
         if "values" in kw:
-            # may need special formatting if any value is an empty string
             kw["values"] = _format_optdict({'v': kw["values"]})[1]
 
         Entry.__init__(self, master, "ttk::combobox", **kw)
@@ -701,7 +702,6 @@
 
     def __setitem__(self, item, value):
         if item == "values":
-            # may need special formatting if any value is an empty string
             value = _format_optdict({item: value})[1]
 
         Entry.__setitem__(self, item, value)
@@ -711,7 +711,6 @@
         """Custom Combobox configure, created to properly format the values
         option."""
         if "values" in kw:
-            # may need special formatting if any value is an empty string
             kw["values"] = _format_optdict({'v': kw["values"]})[1]
 
         return Entry.configure(self, cnf, **kw)

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	Thu Sep  4 20:42:44 2008
@@ -692,8 +692,9 @@
             exportselection, justify, height, postcommand, state,
             textvariable, values, width
         """
+        # The "values" option may need special formatting, so leave to
+        # _format_optdict the responsability to format it
         if "values" in kw:
-            # may need special formatting if any value is an empty string
             kw["values"] = _format_optdict({'v': kw["values"]})[1]
 
         Entry.__init__(self, master, "ttk::combobox", **kw)
@@ -701,7 +702,6 @@
 
     def __setitem__(self, item, value):
         if item == "values":
-            # may need special formatting if any value is an empty string
             value = _format_optdict({item: value})[1]
 
         Entry.__setitem__(self, item, value)
@@ -711,7 +711,6 @@
         """Custom Combobox configure, created to properly format the values
         option."""
         if "values" in kw:
-            # may need special formatting if any value is an empty string
             kw["values"] = _format_optdict({'v': kw["values"]})[1]
 
         return Entry.configure(self, cnf, **kw)


More information about the Python-checkins mailing list