web hosting and development forums
Web Design and Development Forums Archive


Index - Python programming forum

pythonic way of creating a curried function


Post reply

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.
Peter Pitt, you want a curry Or what you might call a partial call or partial invokation
Right. :-) But I imagine Python doesn't have a bind1st function. :-)




Dubai Forum | Paris Forum | Webmaster Forum | Vegan Forum | Brisbane Forum | 3D Forum | Jobs in Dubai | Jobs in London | London UK Classifieds
Archive script by RedHo.com