3 ms·
It is implicit in that the interpolated values are specified anywhere in scope, not inline as with every other formatting option. I consider specifying the val
by schmichael 11y ago
It is implicit in that the interpolated values are specified anywhere in scope, not inline as with every other formatting option.
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.
- sametmax 11y ago@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.
- schmichael 11y agoThe 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.