Antoine Pitrou wrote:
> Raymond Hettinger <python <at> rcn.com> writes:
>> IMO, its only virtue is that people coming from functional languages
>> are used to having compose.  Otherwise, it's a YAGNI.
> 
> Then I wonder how partial() ended up in the stdlib. It seems hardly more
> useful than compose().

I would certainly consider it more useful, but that aside, it's also a lot
simpler to understand and use than the proposed compose() function. I think
the main difference is that compose() requires functional/math skills to be
used and read correctly (and might still be surprising in some corner
cases), whereas partial() only requires you to understand how to set a
function argument. Totally different level of mental complexity, IMHO.

Stefan

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to