Putting a pointer as a value in a method call [python]
<p>I'm trying to have a function where I can put in a list and a pointer, and have it apply that pointer to the objects in the list to give me the object with the lowest value of that pointer.</p>

<pre><code>def GetLowest(ListObject,Value):

    ObjectX=ListObject[0]

    for i in ListObject:

        if i.Value&lt;=ObjectX.Value:

            ObjectX=i

    return ObjectX
</code></pre>

<p>Then I could do things like (assuming I have lists of these objects) <code>GetLowest(Rectangles,Area)</code> and have it check the area of each rectangle. Or maybe something more complex like <code>GetLowest(Backpacks,Wearer.ShoeSize)</code>.</p>

<p>I'm going to want to use this in a few places around my program.
Thanks in advance, guys!</p>
