A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/339583.html below:

New Python chess module

New Python chess module New Python chess moduleWill McGugan news at NOwillmcguganSPAM.com
Fri Sep 30 10:52:18 EDT 2005
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")

More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4