@decorator
def decorated
Is doing: decorated = decorator(decorated)
The switch is implicit too. It's syntaxic sugar to gain a pratical and elegant syntax for a common use case.It's not going to introduce vulnerability. It's going to make your code easier to write and read. It's going to make bug easier to spot in formating. It's going to make shell sessions easier.
Re:New string formatting in Python
by schmichael on Monday January 04, 2016 @02:43PM
(#10837965)
The manipulation (@dec) is still right next to the thing being manipulated (def dec).
I'm not trying to be pedantic. It really does affect readability when syntactic sugar's affect spans an entire scope. Whether or not that effect on readability is greater or less than the gain by the syntactic sugar is always a matter of opinion. Obviously my opinion is out of line with Python's core devs.
I consider specifying the values or variables alongside the formatting string a requirement to be considered explicit, but I can see how it's a matter of opinion.