I’m trying to understand a new feature of Python 2.5 (PEP 309) called
“partial functions”. Here’s the Python example I pulled from Vincent
def multiply(x, y):
return x * y
multiply_by_3 = functional.partial(multiply, 3)
multiply_by_3(4) #=> Will return 12
I understand what it’s doing, I just don’t understand what purpose of
partial functions would be. Can someone provide a use case for me?
Also, can/should we do this in Ruby?
This communication is the property of Qwest and may contain confidential
privileged information. Unauthorized use of this communication is
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and
all copies of the communication and any attachments.