Hi Corry,

On Thu, Jul 14, 2011 at 3:50 PM, Corry Haines <[email protected]> wrote:
> I have some fab files that stack decorators, and while trying theĀ name
> spacingĀ feature, I seem to have hit an odd issue.
> Below are some example files, but the basic issue is that some decorators do
> not seem to stack (and order matters).

Well, decorators in general always have an "order matters" behavior,
unfortunately -- since they are not guaranteed to always return the
function they were given.

This is the case with @task -- it wraps the function in a richer task class.

So, it does need to come first/at the top of the list of decorators.
We should probably add this to the docs so it's explicitly obvious.

Please let us know if that doesn't answer the question -- since *most*
of the other decorators don't care about the ordering (other Fab
decorators simply tack attributes onto the functions and return them)
it shouldn't be a problem, per se, to always stick @task at the top.

Best,
Jeff

-- 
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org

_______________________________________________
Fab-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to