You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that Starlark has gained support for floating point, it makes sense to revisit the decision to not allow width or precision specifiers for % string interpolation formats.
This would be particularly useful for the java implementation of Starlark, where java.util.Formatter's default precision is 6 - meaning "%f" % 2" is currently "2.000000" instead of "2.0".
The text was updated successfully, but these errors were encountered:
My main concern is whether there are subtle differences possible in a naive implementation e.g. w.r.t. rounding behavior, and how much effort we have to go through to ensure compatibility with Python and across multiple Starlark implementations. But it sounds like a sensible addition.
Now that Starlark has gained support for floating point, it makes sense to revisit the decision to not allow width or precision specifiers for
%
string interpolation formats.This would be particularly useful for the java implementation of Starlark, where java.util.Formatter's default precision is 6 - meaning
"%f" % 2"
is currently"2.000000"
instead of"2.0"
.The text was updated successfully, but these errors were encountered: