On Mar 2, 5:51 pm, Thomas Dybdahl Ahle <[EMAIL PROTECTED]> wrote:
> I guess the thing is that I'd have to create a new callable no matter
> how, as it is the only way to bring the extra variables into the getValue
> function when called by sort.

Yes, but you don't have to create it every time you call sortMoves...

def sortKey(move):
    return getMoveValue(board, table, ply, move)

def sortMoves(board, table, ply, moves):
    moves.sort(key=sortKey, reverse=True)
    return moves

Regards,
Jordan

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to