{"id":26019,"date":"2019-07-19T16:34:41","date_gmt":"2019-07-19T20:34:41","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=26019"},"modified":"2019-07-19T16:34:41","modified_gmt":"2019-07-19T20:34:41","slug":"whats-coming-in-python-3-8","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2019\/07\/19\/whats-coming-in-python-3-8\/","title":{"rendered":"What&rsquo;s Coming in Python 3.8"},"content":{"rendered":"<p><a href=\"https:\/\/lwn.net\/SubscriberLink\/793818\/0c6f9dd271021cd4\/\">Jake Edge<\/a> (via <a href=\"https:\/\/news.ycombinator.com\/item?id=20463170\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"https:\/\/lwn.net\/SubscriberLink\/793818\/0c6f9dd271021cd4\/\"><p>Out of that came a new operator, however, that is often called the &ldquo;walrus\noperator&rdquo; due to its visual appearance.  Using &ldquo;<code>:=<\/code>&ldquo; in an\n<code>if<\/code> or <code>while<\/code> statement allows assigning a value to a\nvariable while testing \nit.<\/p><p>[&#8230;]<\/p><p>The <a href=\"https:\/\/lwn.net\/Articles\/656898\/\">f-strings (or formatted strings)<\/a> added\ninto Python 3.6 are quite useful, but Pythonistas often found that they\nwere using them the same way in debugging output.  So Eric V. Smith <a href=\"https:\/\/mail.python.org\/pipermail\/python-ideas\/2018-October\/053956.html\">proposed<\/a>\nsome additional syntax for f-strings to help with debugging output.<\/p><p>[&#8230;]<\/p><p>Another change for 3.8 affords pure-Python functions the same options for\nparameters that those implemented in C already have.  <a href=\"https:\/\/www.python.org\/dev\/peps\/pep-0570\/\">PEP 570<\/a> (&ldquo;Python\nPositional-Only Parameters&rdquo;) introduces new syntax that can be used in\nfunction definitions to <a href=\"https:\/\/lwn.net\/Articles\/785245\/\">denote positional-only\narguments<\/a>&mdash;parameters that cannot be passed as keyword arguments.<\/p><\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2019\/01\/23\/python-gets-a-new-governance-model\/\">Python Gets a New Governance Model<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2018\/07\/13\/guido-van-rossum-steps-down-as-python-bdfl\/\">Guido van Rossum Steps Down as Python BDFL<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Jake Edge (via Hacker News): Out of that came a new operator, however, that is often called the &ldquo;walrus operator&rdquo; due to its visual appearance. Using &ldquo;:=&ldquo; in an if or while statement allows assigning a value to a variable while testing it.[&#8230;]The f-strings (or formatted strings) added into Python 3.6 are quite useful, but [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2019-07-19T20:34:47Z","apple_news_api_id":"4abb413a-3b4b-45ed-98de-749048b5d228","apple_news_api_modified_at":"2019-07-19T20:34:48Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/ASrtBOjtLRe2Y3nSQSLXSKA","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[46,71,232],"class_list":["post-26019","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-languagedesign","tag-programming","tag-python"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/26019","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=26019"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/26019\/revisions"}],"predecessor-version":[{"id":26021,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/26019\/revisions\/26021"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=26019"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=26019"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=26019"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}