New Python chess module

Pekka Karjalainen pkarjala at mail.student.oulu.fi
Fri Sep 30 10:07:23 EDT 2005


> Its still rough around the edges and not fully tested. I'll eventualy 
> release a more polished version and possibly put it on Sourceforge. In 
> the meantime I would be grateful for any feedback..

Somebody ought to comment this in more detail...

I have one minor point. It looks like your test whether the location is on
the board is needlessly complex. Python understands multiple comparisons
like in mathematical notation, and not like in e.g. C language. This
snippet shows what I mean:

>>> [x for x in range(10) if 2<x<7] # 2<x<7 means 2<x and x<7
[3, 4, 5, 6]

Read about it in the reference:
http://www.python.org/doc/2.4.2/ref/comparisons.html

-- 
Pekka Henrik Karjalainen
who still occasionally writes if (test): because of all the C



More information about the Python-list mailing list