Re: tuple to string?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: tuple to string?

From: Scott David Daniels <Scott.Daniels@Acm.Org>
Date: Sat Jul 23 2005 - 13:43:07 CEST

Steven D'Aprano wrote:
> On Fri, 22 Jul 2005 06:07:28 -0700, Robert Kern wrote:
> ... or even:
>
>>>>''.join(map(lambda n: chr(n), (0x73, 0x70, 0x61, 0x6D)))
>
> 'spam'

This is exactly what is wrong with lambda. It yearns for over-use.
This last should be:

>>>''.join(map(chr, (0x73, 0x70, 0x61, 0x6D)))

--Scott David Daniels
Scott.Daniels@Acm.Org
Received on Thu Sep 29 17:07:23 2005