Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

%i not handled #1

Open
eichin opened this issue Oct 10, 2015 · 0 comments
Open

%i not handled #1

eichin opened this issue Oct 10, 2015 · 0 comments

Comments

@eichin
Copy link

eichin commented Oct 10, 2015

%-formatting has i, {}-formatting doesn't, so while

In [1]: from formatist import convert
In [11]: fstr = "%(foo)i"
In [14]: fstr % dict(foo=3.9)
Out[14]: '3'
In [15]: convert(fstr).format(foo=3.9)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-15-ce673c4d3d28> in <module>()
----> 1 convert(fstr).format(foo=3.9)

ValueError: Unknown format code 'i' for object of type 'float'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant