Fable.Python
Fable.Python copied to clipboard
string format specifier '{i:X4}' not working
let i = 123
$"\\u{i:X4}" #
val it: string = "\u007B"
However it produces \u%P(X4) in 4.0.0-alpha-020...
workaround:
(sprintf "%4X" i).Replace(" ", "0")
printf in fable_modules works well.
FYI: This looks to be failing in Fable JS as well, please submit an issue to https://github.com/fable-compiler/Fable