Open t-bltg opened 2 years ago
In Python, we are allowed to interpolate the format as a string, (useful when used across the whole program):
Python
>>> fmt = '.4g' >>> x = 3.14159 >>> f'{x:{fmt}}' '3.142'
This PR allows to do the following:
julia> using Fmt julia> fmt = ".4g"; julia> x = 3.14159; julia> f"{$x:{$fmt}}" "3.142"
Maybe there's a better way to enhance this, but for now it works :)
@bicycle1885, would it be possible to review this PR and https://github.com/bicycle1885/Fmt.jl/pull/4 ?
Thanks !
@bicycle1885, bump.
In
Python
, we are allowed to interpolate the format as a string, (useful when used across the whole program):This PR allows to do the following:
Maybe there's a better way to enhance this, but for now it works :)