134 points · by stablemap · 9y ago · 20 comments
What it does: http://jinja.pocoo.org/docs/2.10/nativetypes/
See https://github.com/pallets/jinja/pull/708 and its reference issues.
This is a hit or a miss in implementation. Dict, list, boolean, float, int, str are all acceptable primitives that must be handled properly.
But the module can't send an actual integer to the API if the API expects an int. It always came out as a string.
This is due to the issue with native types.
You could add logic to recognize integers and let users specify if they want integer conversion of values or not but that's a lot of extra crud for something that could be very simple.