sorting question

Ksenia Marasanova ksenia.marasanova at
Wed Aug 10 08:33:15 EDT 2005

2005/8/10, Peter Otten <__peter__ at>:
> I think you cannot get away with your first rule, but have to operate on the
> full path instead. Otherwise the position of inner nodes would sometimes be
> determined by their url and sometimes by their ord_number *during* *the*
> *same* *sort*.

Rrr.. of course, you're right! Thanks.

Your code works great, I only made one slightly change:

    def get_key(self):
        return [(, node.ord_number) for node in self.get_path()]

Because of errors in my tree some siblings has the same ord_number.


More information about the Python-list mailing list