Nobody <nob...@nowhere.com> writes:
>> 2,7,1,8,...  You can sort these with cmp but not with key.
>
> Is there some restriction on the return type of the key= function? If not,
> you can define a class with appropriate comparison methods and have key=
> return instances of that class.

Sorry, yeah, of course you can do it that way, but it's bloody ugly and
you're no longer gaining the supposed benefit of the DSU pattern.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to