Steven D'Aprano <[EMAIL PROTECTED]> writes: > Can you explain more carefully what you are trying to do? If you want the > square of the maximum value, just do this:
I want to get the value of another attribute of the instance with maximum x. I know I could do it like you suggest for the case with x*x, but the other attribute does not depend on x. > [The above paragraph is always true, except for the exceptions when it is > not true. You will know when you need id(). If you only *think* you need > id(), you don't need it.] :-) > algorithm relies on object X knowing that it is the 5th item of list L, > then you must either store that information yourself somewhere, and > maintain it, or you must change your algorithm. OK, I think this is the answer I was looking for. -- Brian (remove the sport for mail) http://www.et.web.mek.dtu.dk/Staff/be/be.html http://www.rugbyklubben-speed.dk -- http://mail.python.org/mailman/listinfo/python-list