setattr question

Kent Johnson kent at
Fri Mar 3 02:51:49 CET 2006

Gerard Flanagan wrote:
> 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)

	return self._function(*_args, **_kargs)


More information about the Python-list mailing list