Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!news.informatik.hu-berlin.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Neil Cerutti Newsgroups: comp.lang.python Subject: Re: First attempt at a Python prog (Chess) Date: 15 Feb 2013 16:17:02 GMT Organization: Norwich University Lines: 10 Message-ID: References: <2013021323250974803-chrishinsley@gmailcom> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: individual.net l2uNskn1ihhSwdd+YequugxRPPztepj4uH382cJdqNEZ/tnxXc3x6zTQrFAgBbK3Ar Cancel-Lock: sha1:MBC5WnKfPG1UfhXFHEmZ2+LeY7o= User-Agent: slrn/0.9.9p1/mm/ao (Win32) Xref: csiph.com comp.lang.python:38927 On 2013-02-15, Oscar Benjamin 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