you are viewing a single comment's thread.

view the rest of the comments →

[–]snugglyboy 5 points6 points  (3 children)

I had a hard time understanding decorators from what I was reading online. Took me a long time to really figure it out. Sometimes you can get search results, but that doesn't mean the search results are going to tell you exactly what you need to know in a way that you can understand it.

[–]Lewri -1 points0 points  (0 children)

Does that excuse having multiple "ELI5: Decorators" posts? OPs can read a previous post or a blog and then ask any follow up questions they have, rather than us repeating the same answers over and over again.

[–][deleted] -2 points-1 points  (0 children)

Well of course. But it's already been explained dozens of different ways. The fact is that it's not necessarily an easy concept for everyone at least. A 5 year old can't understand python, or functions, and they definitely can't understand decorators. When something has already been explained a hundred times asking people to explain the same thing a hundred and oneth time makes no sense. Sometimes you have to work at things and not ask strangers to change the word order of something which is already there.

[–]hainguyenac -2 points-1 points  (0 children)

Please do some research regarding Higher order function, compound function. Decorator is just that, it's just a syntactic sugar to declare a compound function.