|
From: David J. C. B. <be...@ve...> - 2004-03-07 18:42:32
|
PyX Developers,
I've recently started using PyX to prepare a few presentation quality
graphics and I really like the quality of output it produces.
I've been trying to add some "layout-management" type classes so that I
can combine multiple images into larger layouts (such as grids/tables).=20
In so doing, I ran into the problem that instances of the unit.length()
class do not numerically compare, but simply have the default
"compare-by-id" behavior implemented by Python. I don't like this at
all. :)
I patched my own installation of PyX to ammend this, and am offering the
change here. Can this go back into the distribution?
(in unit.length...)
def __cmp__(self, other):
l1 =3D tom(self)
l2 =3D tom(other)
if l1 <> l2: return cmp(l1,l2)
return cmp(id(self), id(other))
Dave
--=20
David J. C. Beach
<be...@ve...>
|