New Python chess module
Will McGugan
news at NOwillmcguganSPAM.com
Fri Sep 30 10:52:18 EDT 2005
More information about the Python-list mailing list
Fri Sep 30 10:52:18 EDT 2005
- Previous message (by thread): New Python chess module
- Next message (by thread): New Python chess module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Pekka Karjalainen wrote: > > 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 > Thanks. I was aware of that, I've just never got in to the habbit of using it.. Will McGugan -- http://www.willmcgugan.com "".join({'*':'@','^':'.'}.get(c,0) or chr(97+(ord(c)-84)%26) for c in "jvyy*jvyyzpthtna^pbz")
- Previous message (by thread): New Python chess module
- Next message (by thread): New Python chess module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list