logoalt Hacker News

smitty1etoday at 7:24 PM1 replyview on HN

Whenever I'm building a JSON document, I revert to the old %s syntax just because it's more tidy than an f-string.


Replies

folkravtoday at 7:39 PM

Am I understanding that you’re building JSON with string interpolation? If so any special reason you wouldn’t build a dict and json.dumps() it?