but … the whole point of string interpolation is not to have to use the inconvenient printf syntax where the variables appear at the end instead of at the place where they’re used. So for me the @sprintf version is much better than the @printf one, but it absolutely isn’t readable or convenient to type.
Another solution would be to use StrFormat, and you can write it as: println(f"The square root of pi is \%07.2f(√π)")
or (a short form, useful for when you are inserting debugging print statements) pr"The square root of pi is \%07.2f(√π)"
That bug you are referring to is one I inherited from the Formatting.jl package - and it only affects the use of the Python style printfmt and FormatSpec interface - not the code used by the C printf style formatting used by StrFormat (which is pretty much identical to the formatting code in stdlib/Printf.jl)
The JuliaString packages have been fairly rigorously tested (in many cases there’s a lot more testing of the string functions than in base for String), although it’s true I hadn’t done much to write additional tests for the Python style formatting from the JuliaIO/Formatting.jl package (not being a Python programmer myself)
That seems like a reason to also not use JuliaIO/Formatting.jl, rather than a reason to use Format.jl. It seems the Printf stdlib does not have such egregious bugs (/ when it does, they are fixed) and so it should be preferred over both.
All of the bugs that had been found in JuliaIO/Formatting.jl have now been fixed in JuliaString/Format.jl, as well as a number features in Python formatted strings have now been implemented as well (such as center justification, with ^, using , or _ to group digits, and precision to truncate strings).
Note that Printf does have some bugs handling precision to truncate strings (in particular, when there are wide characters in the string)