incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject svn commit: r1367829 - in /incubator/ooo/trunk/main: sc/workben/celltrans/parse.py toolkit/src2xml/source/boxer.py toolkit/src2xml/source/globals.py toolkit/src2xml/source/srclexer.py
Date Tue, 31 Jul 2012 23:56:35 GMT
Author: pfg
Date: Tue Jul 31 23:56:34 2012
New Revision: 1367829

URL: http://svn.apache.org/viewvc?rev=1367829&view=rev
Log:
Python: use sorted() instead of .sort()

Modified:
    incubator/ooo/trunk/main/sc/workben/celltrans/parse.py
    incubator/ooo/trunk/main/toolkit/src2xml/source/boxer.py
    incubator/ooo/trunk/main/toolkit/src2xml/source/globals.py
    incubator/ooo/trunk/main/toolkit/src2xml/source/srclexer.py

Modified: incubator/ooo/trunk/main/sc/workben/celltrans/parse.py
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sc/workben/celltrans/parse.py?rev=1367829&r1=1367828&r2=1367829&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sc/workben/celltrans/parse.py (original)
+++ incubator/ooo/trunk/main/sc/workben/celltrans/parse.py Tue Jul 31 23:56:34 2012
@@ -62,8 +62,7 @@ class LocaleData(object):
         chars += "\"), OUString(), OUString());\n\n"
 
         # pre instantiations of localized function names.
-        funcs = self.funcList.keys()
-        funcs.sort()
+        funcs = sorted(self.funcList.keys())
         chars += "// pre instantiations of localized function names\n"
         for func in funcs:
             for item in self.funcList[func]:

Modified: incubator/ooo/trunk/main/toolkit/src2xml/source/boxer.py
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/toolkit/src2xml/source/boxer.py?rev=1367829&r1=1367828&r2=1367829&view=diff
==============================================================================
--- incubator/ooo/trunk/main/toolkit/src2xml/source/boxer.py (original)
+++ incubator/ooo/trunk/main/toolkit/src2xml/source/boxer.py Tue Jul 31 23:56:34 2012
@@ -38,11 +38,9 @@ class DlgLayoutBuilder(object):
 
     def build (self):
         root = Element('vbox')
-        ys = self.rows.keys()
-        ys.sort()
+        ys = sorted(self.rows.keys())
         for y in ys:
-            xs = self.rows[y].keys()
-            xs.sort()
+            xs = sorted(self.rows[y].keys())
 
             if len(xs) == 1:
                 root.appendChild(self.rows[y][xs[0]])

Modified: incubator/ooo/trunk/main/toolkit/src2xml/source/globals.py
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/toolkit/src2xml/source/globals.py?rev=1367829&r1=1367828&r2=1367829&view=diff
==============================================================================
--- incubator/ooo/trunk/main/toolkit/src2xml/source/globals.py (original)
+++ incubator/ooo/trunk/main/toolkit/src2xml/source/globals.py Tue Jul 31 23:56:34 2012
@@ -128,8 +128,7 @@ class Element(Node):
 
     def __dumpAttrs (self):
         text = ''
-        keys = self.attrs.keys()
-        keys.sort()
+        keys = sorted(self.attrs.keys())
         for key in keys:
             value = self.attrs[key]
             text += ' %s="%s"'%(key, value)

Modified: incubator/ooo/trunk/main/toolkit/src2xml/source/srclexer.py
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/toolkit/src2xml/source/srclexer.py?rev=1367829&r1=1367828&r2=1367829&view=diff
==============================================================================
--- incubator/ooo/trunk/main/toolkit/src2xml/source/srclexer.py (original)
+++ incubator/ooo/trunk/main/toolkit/src2xml/source/srclexer.py Tue Jul 31 23:56:34 2012
@@ -223,8 +223,7 @@ build the syntax tree.
         if not self.parentLexer and self.debug:
             progress ("-"*68 + "\n")
             progress ("All defines found in this translation unit:\n")
-            keys = self.defines.keys()
-            keys.sort()
+            keys = sorted(self.defines.keys())
             for key in keys:
                 progress ("@ %s\n"%key)
 



Mime
View raw message