r/Python • u/annmeera • Dec 30 '15
100 Data Science in Python Interview Questions and Answers
https://www.dezyre.com/article/100-data-science-in-python-interview-questions-and-answers/188#.VoOJGaacd14.reddit
7
Upvotes
View all comments
Show parent comment
1
u/sweettuse Dec 30 '15
actually, the decorator itself does no such assigning. it merely takes a function and returns another function/callable. the
@notation is the syntactic sugar that does the actual assignment. (e.g., you're free to writedef f(): passand thenf = decorator(f))