{"id":1083,"date":"2015-09-11T20:32:40","date_gmt":"2015-09-12T02:32:40","guid":{"rendered":"http:\/\/jaredrobinson.com\/blog\/?p=1083"},"modified":"2015-09-11T20:32:40","modified_gmt":"2015-09-12T02:32:40","slug":"python-theres-more-than-one-way-to-format-a-string","status":"publish","type":"post","link":"https:\/\/jaredrobinson.com\/blog\/python-theres-more-than-one-way-to-format-a-string\/","title":{"rendered":"Python: There&#8217;s more than one way to format a string"},"content":{"rendered":"<p>LWN.net has an interesting article about <a href=\"https:\/\/lwn.net\/Articles\/656898\/\">Easier <span id=\"0.0519116367213428\" class=\"highlight\">Python<\/span> string formatting<\/a>.\u00a0Summary: For <span id=\"0.09355012001469731\" class=\"highlight\">Python<\/span> 3.6, they&#8217;re going to introduce yet another way to format strings, called f-strings.<\/p>\n<p><span style=\"font-family: 'Courier New', monospace;\">\u00a0 answer = 42<\/span><span style=\"font-family: 'Courier New', monospace;\"><br \/>\n<\/span><span style=\"font-family: 'Courier New', monospace;\">\u00a0 f&#8217;The answer is {answer}&#8217;<\/span><\/p>\n<div>They also have a proposal of how to make it secure, so that untrusted input contained in variables doesn&#8217;t introduce\u00a0problems.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>LWN.net has an interesting article about Easier Python string formatting.\u00a0Summary: For Python 3.6, they&#8217;re going to introduce yet another way to format strings, called f-strings. \u00a0 answer = 42 \u00a0 f&#8217;The answer is {answer}&#8217; They also have a proposal of how to make it secure, so that untrusted input contained in variables doesn&#8217;t introduce\u00a0problems.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,17],"tags":[],"class_list":["post-1083","post","type-post","status-publish","format-standard","hentry","category-programming","category-tech"],"_links":{"self":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/1083","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/comments?post=1083"}],"version-history":[{"count":5,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/1083\/revisions"}],"predecessor-version":[{"id":1088,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/1083\/revisions\/1088"}],"wp:attachment":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/media?parent=1083"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/categories?post=1083"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/tags?post=1083"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}