diff --git a/py/apigen/htmlgen.py b/py/apigen/htmlgen.py index 9b2bed091..4e0edfa3e 100644 --- a/py/apigen/htmlgen.py +++ b/py/apigen/htmlgen.py @@ -10,6 +10,8 @@ from py.__.apigen.rest.genrest import split_of_last_part from py.__.apigen.linker import relpath from py.__.apigen.html import H +reversed = py.builtin.reversed + sorted = py.builtin.sorted html = py.xml.html raw = py.xml.raw @@ -423,7 +425,7 @@ class ApiPageBuilder(AbstractPageBuilder): if isinstance(val, property): val = '' properties.append((attr, val)) - properties.sort(key=lambda a: a[0]) # sort on name + properties.sort(lambda x,y : cmp(x[0], y[0])) # sort on name return properties def build_methods(self, dotted_name): diff --git a/py/apigen/tracer/testing/test_package.py b/py/apigen/tracer/testing/test_package.py index d6a98aebf..0014cc2c4 100644 --- a/py/apigen/tracer/testing/test_package.py +++ b/py/apigen/tracer/testing/test_package.py @@ -23,7 +23,7 @@ class TestFullModule(object): def test_init(self): ds = self.ds - print sorted(ds.descs.keys()) + print py.builtin.sorted(ds.descs.keys()) assert len(ds.descs) == 6 assert py.builtin.sorted(ds.descs.keys()) == [ 'notpak.notmod.notclass', 'notpak.notmod.notclass.__init__',