Warren Stringer <[EMAIL PROTECTED]> wrote: >#-------------------------------------- >class do(list): > def __call__(self,*args,**kwargs): > return [f(*args,**kwargs) for f in self] > > >def a(): print 'a called' >def b(): print 'b called' >c = do() >c = [a,b] >do(c[:])() >do(c)() >#-------------------------------------- > >I prefer that last line, because [:] is very expensive to type from a cell >phone.
And not because it's completely redundant? >Now, if I could only could do this: > > do(orchestra(conductor)).play() Something along the lines of: def __getattr__(self, name): return do(getattr(x, name) for x in self) ? -- \S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/ "Frankly I have no feelings towards penguins one way or the other" -- Arthur C. Clarke her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump
-- http://mail.python.org/mailman/listinfo/python-list