On Mon, Aug 5, 2013 at 8:58 AM, Markus Rother <markus.rot...@web.de> wrote:
> Thanks for the good explanation.
>
> My intention was to pass a custom method/function as a comparator
> to an object.  My misconception was, that __eq__ is equivalent to
> the '==' operator, and could be passed as a first class function.
> Apparently, that is not possible without wrapping the comparison
> into another function/method.

The operator.eq function is equivalent to the == operator.  Use that.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to