> # Create the decorator > def decorador(function): > def new_function(*args, **kwargs): > # Do what need do > return function(*args, **kwargs) > new_function.__doc__ = function.__doc__ > new_function.__name__ = function.__name__ > return new_function > > # Then use it > @decorador > def another_function(params): > # bla bla bla
And how can I add vars to the function local namespace ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---