4 ms·
Going back a few posts: > There was a guy at work who insisted on using .format() for everything that soured me on it, sometimes even simple string concatenat
by dalke 12y ago
Going back a few posts:
> There was a guy at work who insisted on using .format() for everything that soured me on it, sometimes even simple string concatenation
It sounds like you are soured on new-style .format() because someone else doesn't use it appropriately. You concluded that it's intrinsic to .format(), even though s%{} is even more verbose, because of what seems to be an idiosyncratic preferences of one person.
I empathize with your other arguments. I too am much more familiar with printf-style % arguments than the Python-specific .format() syntax, which still cause me to reach for the documentation. But I do not think that it's reasonable to complain about its verbosity.
- mixmastamyk 12y agoIt is, Guido said it himself. Looks like I added an extra pair of curly brackets into the example that I first mentioned. That was a typo, sorry about that, it shouldn't have existed, and unfortunately probably why you insist that someone should do this 's%'%{...} though no one ever has to my knowledge.