Mike Meyer <[EMAIL PROTECTED]> writes:
> >>> map(operator.add, (1, "abc", 0.3), (2, "def", 10.2))
> [3, 'abcdef', 10.5]
> 
> Not having to do the zip is win. operator.add is a lose. I'm not sure
> either is what I'd call elegant.

Yeah, I didn't bother checking whether you could pass dyadic functions
to map.  Given that you can, I see nothing wrong with lambda x,y: x+y
instead of operator.add, but that's just me.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to