On 27/12/05, Jeff Watkins <[EMAIL PROTECTED]> wrote: > > I don't usually chime in on things like this (because almost > everything I do is Ajax oriented) but there's no reason to even > bother with keyword parameters. Just accept varargs and process them > left to right based on type: if it's a form, validate the form, if > it's a validator, validate it. > > That way you have: > > @expose( html="my.template" ) > @validate( myForm, anExtraValidatorJustForThisMethod ) > def anOperation( self, arg1, arg2 ): > pass
Not a fan for two reasons: "Explicit is better than implicit", and you'd lose consistancy between related functions (either expose and validate should both have kwargs, or neither should) Plus, IMHO using type introspection is a bit broken (though sometimes necessary in python at the moment). +1 for validate, process is too generic -- wavy davy "True religion confronts earth with heaven and brings eternity to bear on time" - A. W. Tozer

