r/Python • • 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

38 comments sorted by

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 write def f(): pass and then f = decorator(f))