[Python-Dev] functools.compose to chain functions together (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Sun Aug 16 19:39:19 CEST 2009
- Previous message: [Python-Dev] functools.compose to chain functions together
- Next message: [Python-Dev] functools.compose to chain functions together
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Raymond Hettinger <python 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(). Either we decide it is useful to have a set of basic "functional" tools in the stdlib, and both partial() and compose() have their place there, or we decide functools has no place in the stdlib at all. Providing a half-assed module is probably frustrating to its potential users.
(not being particularly attached to functional tools, I still think compose() has its value, and Jason did a good job of presenting potential use cases)
Regards
Antoine.
- Previous message: [Python-Dev] functools.compose to chain functions together
- Next message: [Python-Dev] functools.compose to chain functions together
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]