I can then have the code check to see if default is callable and if it is then it will run it everytime the decorated method is called. Or I could add a new default_cb param that would do the same thing, it would just be more explicit. I think I like checking default for a callback is better, even though it would make it so default could never be a function value, I'm not sure that really matters?
the default will only be run once, so it's not per request like you would expect, there are 2 ways to fix this:
I can then have the code check to see if
default
is callable and if it is then it will run it everytime the decorated method is called. Or I could add a newdefault_cb
param that would do the same thing, it would just be more explicit. I think I like checkingdefault
for a callback is better, even though it would make it so default could never be a function value, I'm not sure that really matters?