[Pythonmac-SIG] algorithm wanted

Dethe Elza delza at livingcode.org
Wed Feb 2 03:19:27 CET 2005


On 1-Feb-05, at 4:47 PM, has wrote:

> Henning Hraban Ramm wrote:
>
>> I'm looking for a better algorithm...
>
> This is probably as terse as it gets:

[snip]

# zip() isn't needed in this direction
def cm0k2bool(s):
     return [x != '0' for x in s]

--Dethe

"The law I sign today directs new funds and new focus to the task of 
collecting vital intelligence on terrorist threats and on weapons of 
mass production."   -- George W. Bush
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2488 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050201/e156b17d/smime.bin


More information about the Pythonmac-SIG mailing list