On Thursday, July 12, 2012 11:51:04 AM UTC+8, Steven D'Aprano wrote: > On Wed, 11 Jul 2012 20:39:45 -0700, 88888 Dihedral wrote: > > > I'll contribute my way of python programming: > > > > def powerb(x, b): # > > return x**b > > Here's a shorter version: > > py> pow > <built-in function pow> > > > > One functor is enough! > > Nothing we have been discussing in this thread has been a functor, either > in the Haskell sense or the C++ sense. > > > > -- > Steven
Well, I encountered this kind of problems before in OOP. I have to make sure my functor to keep the state variable values for different objects that call the same functor to behave correctly in order to avoid passing extra parameters in various objects using the same functor. -- http://mail.python.org/mailman/listinfo/python-list