Gerard Flanagan wrote: > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/86900 > > mais il utilise 'apply', qui est...blah > > I was trying to implement the factory pattern. > The recipe above uses 'apply' which is deprecated according to the > docs, and I suppose I was curious how to do the same sort of thing > without 'apply'.
Apply has been replaced by 'extended call syntax', that is why it is deprecated. Instead of return apply(self._function,_args,_kargs) write return self._function(*_args, **_kargs) Kent -- http://mail.python.org/mailman/listinfo/python-list