[svn r38504] fixes for python2.3

--HG--
branch : trunk
This commit is contained in:
hpk 2007-02-11 19:36:38 +01:00
parent 14ad83da06
commit 508eb5d4de
2 changed files with 4 additions and 2 deletions

View File

@ -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 = '<property object (dynamically calculated value)>'
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):

View File

@ -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__',