Formatting.jl icon indicating copy to clipboard operation
Formatting.jl copied to clipboard

Passing format keyword arguments

Open hayd opened this issue 10 years ago • 1 comments

In python you can do the following:

 >>> "{a}".format(a=1)
'1'

it would be nice to do the same with Formatting.

hayd avatar Sep 26 '15 00:09 hayd

It's just string interpolation, but restricted to .format. For formatting, it would be good not to use things that are likely to conflict with common characters (like $ or even a bare {). Swift's method of marking interpolation comes to mind, i.e. \(expr).

ScottPJones avatar Sep 26 '15 13:09 ScottPJones