redho home | products | services
Web Design Forums

Web Design Forums  


Web Hosting, Web Design, Software and Web Development Forums  
 FAQFAQ   MemberlistArchive  Log inLog in   RegisterRegister 
         

pythonic way of creating a curried function



 
Post new topic   Reply to topic    Web Design Forums -> Python programming forum
View previous topic :: View next topic  
Author Message
Peter Pitt



Joined: 20 May 2006
Posts: 114
Location: Egypt
What's a pythonic way of creating a curried function?
Say I have a function that expects a function of one paramter, and I have a function of two parameters.
I'd like to bind one of the parameters of the second function so I can pass it to the first.
I can do that with a lambda expression and a default argument, but it seems a little unclean.
  Reply with quote


Lusis Backwood JR



Joined: 26 May 2006
Posts: 87
Location: United States
Peter Pitt, you want a curry
Or what you might call a partial call or partial invokation
  Reply with quote
Peter Pitt



Joined: 20 May 2006
Posts: 114
Location: Egypt
Right. Smile
But I imagine Python doesn't have a bind1st function. Smile
  Reply with quote
Page 1 of 1
Post new topic   Reply to topic    Web Design Forums -> Python programming forum


Dubai Forums - Expat Help | Vegan Chat | Java Programming | Free 3D tutorials and 3d textures | Paris Forum | EU Forum
Free Dubai Classifieds | Free London Classifieds | Jobs in London

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

Powered by phpBB © 2001, 2005 phpBB Group