I prefer str.format() over the % operator, because: https://docs.python.org/2.7/library/stdtypes.html#str.format
"This method of string formatting is the new standard in Python 3, and should be preferred to the % formatting described in String Formatting Operations in new code." Without an Impala Python style guide, I tend to use what I see on docs.python.org, modulo our 2-space indent and 90-char line policy. On Fri, Jan 27, 2017 at 2:44 PM, Lars Volker <[email protected]> wrote: > Hi All, > > do we have a strong preference for either old style or new style string > formatting in Python? > > "Hello %s!" % ("world") *vs* "Hello {0}!".format("world") > > The Impala Style Guide > <https://cwiki.apache.org/confluence/display/IMPALA/Impala+Style+Guide> > doesn't > mention Python at all. > > Thanks, Lars
