First attempt at a Python prog (Chess)

Neil Cerutti neilc at norwich.edu
Fri Feb 15 11:17:02 EST 2013


On 2013-02-15, Oscar Benjamin <oscar.j.benjamin at gmail.com> wrote:
> if score > best_score or best_score is None:

You need the None check first to avoid an exception from the
comparison.

if best_score is None or score > best_score:

-- 
Neil Cerutti



More information about the Python-list mailing list