2 ms·
Though decorators functional identically do just passing a function to another function which returns a function, the decorator syntax is uniquely useful. For
by baddox 16y ago
Though decorators functional identically do just passing a function to another function which returns a function, the decorator syntax is uniquely useful. For framework like Django, it lets you "tag" a function with a single line at the top. I think this greatly enhances readability over the alternative.