On 05/10/2016 08:45 AM, Steven D'Aprano wrote:

I have a decorator that adds an attribute to the decorated function:

My question is, what should I do if the decorated function already has an
instrument attribute?

If the decorator is adding an attribute for the decorated thing to use, and that thing may already have the correct attribute, do nothing; otherwise, raise an exception.

--
~Ethan~

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to