D'Arcy J.M. Cain wrote:
>> I find I hit it mostly with calls to map() where I want to apply 
>> some transform (as above) to all the items in a list of 
>> parameters such as
>>
>>    "%s=%s&%s=%s" % map(urllib.quote, params)
> 
> Isn't map() deprecated?  The above can be done with;
> 
>     "%s=%s&%s=%s" % tuple([urllib.quote(x) for x in params])
> 
>> Any suggestions?  (even if it's just "get over your hangup with 
>> wrapping the results in list()/tuple()" :)
> 
> Pretty much.  :-)
> 

...except for saving on a level of brackets or parens, since you can actually 
write

"%s=%s&%s=%s" % tuple(urllib.quote(x) for x in params)

instead of the above

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to