First attempt at a Python prog (Chess)

Matt Jones matt.walker.jones at gmail.com
Fri Feb 15 13:03:08 EST 2013


"Only in Python 3."

Use best practices always, not just when you have to.

*Matt Jones*


On Fri, Feb 15, 2013 at 11:52 AM, MRAB <python at mrabarnett.plus.com> wrote:

> On 2013-02-15 16:17, Neil Cerutti wrote:
>
>> 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.
>>
>>  Only in Python 3.
>
>
>  if best_score is None or score > best_score:
>>
>>
> --
> http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130215/a7b8e293/attachment.html>


More information about the Python-list mailing list