- alter the decorator function, and the newer public_factory function,
to use a named def instead of a lambda.  this so that TypeError on wrong
arguments are more legible.  [ticket:2884]