0

Decorators in Python - I need help.

Write a decorator named "logo" which takes a sequence of tags and logs a message in case an exception happens within the decorated function. #something like this, ain't sure how to got about it def log(utf8_string, tags): def logo(log): #Example usage @logo('tag_one', 'tag_two') def example(): raise Exception("There's been an error")

5th Jul 2022, 8:09 PM
Timm0x443
Timm0x443 - avatar
2 Answers
+ 3
Show your attempt.
5th Jul 2022, 8:50 PM
Chris Coder
Chris Coder - avatar
0
done
6th Jul 2022, 8:20 AM
Timm0x443
Timm0x443 - avatar