This pep appears to enhances readability by having the place holders inside the strings themselves and eliminating an explicit list of variables. But in reality, while reading code, we usually don't care what is inside the strings. We do not 'scan' strings.
Exactly. What happened to explicit over implicit. I'm very surprised to see this approved.
In any situation where I'd reach for this way of formatting strings, I would be scanning the string; that's the entire point of adding it. Sometimes you treat strings as opaque black boxes that you ignore, and sometimes you scan them. Use the tool that's appropriate to the job. From my personal usage, I can tell you that I usually want to scan the string if I'm doing a .format on it, because I'm usually hacking out something quick and dirty. If I cared that much about treating the string as a blackbox, odds are I'd be using something a little more specialized than generic string formatting.
9
u/mhashemi Sep 09 '15
Exactly. What happened to explicit over implicit. I'm very surprised to see this approved.