Michael Torrie <torr...@gmail.com>: > http://en.cppreference.com/w/cpp/utility/functional/function > > Thus if we were to shoehorn your example into C++, the result would be > idiomatically very similar to what you have in your Python code.
I can understand why you wouldn't write out my example in C++: using std::placeholders::_1; std::function<void(int)> f_add_display2 = std::bind( &Foo::print_add, foo, _1 ); vs f_add_display2 = foo.print_add The cherry on top: "_1"! The C++ compiler figures out template types heroically but can't wrap its head around the arity of the method. Marko -- https://mail.python.org/mailman/listinfo/python-list