DocumentationTools/APIGenerator.py

changeset 12
1d8dd9706f46
parent 0
de9c2efb9d02
child 13
1af94a91f439
diff -r b0996e4a289e -r 1d8dd9706f46 DocumentationTools/APIGenerator.py
--- a/DocumentationTools/APIGenerator.py	Fri Jan 01 16:11:36 2010 +0000
+++ b/DocumentationTools/APIGenerator.py	Sat Jan 02 15:11:35 2010 +0000
@@ -85,8 +85,7 @@
         """
         Private method to generate the api section for classes.
         """
-        classNames = self.module.classes.keys()
-        classNames.sort()
+        classNames = sorted(list(self.module.classes.keys()))
         for className in classNames:
             if not self.__isPrivate(self.module.classes[className]):
                 self.__addClassVariablesAPI(className)
@@ -99,10 +98,7 @@
         @param classname Name of the class containing the method. (string)
         """
         _class = self.module.classes[className]
-        methods = _class.methods.keys()
-        methods.sort()
-        
-        # first do the constructor
+        methods = sorted(list(_class.methods.keys()))
         if '__init__' in methods:
             methods.remove('__init__')
             if _class.isPublic():
@@ -156,8 +152,7 @@
         """
         Private method to generate the api section for functions.
         """
-        funcNames = self.module.functions.keys()
-        funcNames.sort()
+        funcNames = sorted(list(self.module.functions.keys()))
         for funcName in funcNames:
             if not self.__isPrivate(self.module.functions[funcName]): 
                 if self.module.functions[funcName].isPublic():

eric ide

mercurial