{"id":1502,"date":"2021-06-28T15:21:00","date_gmt":"2021-06-28T15:21:00","guid":{"rendered":"https:\/\/otus.ru\/journal\/?p=1502"},"modified":"2021-06-28T15:21:01","modified_gmt":"2021-06-28T15:21:01","slug":"chto-novogo-poyavilos-v-python-v-2021-godu","status":"publish","type":"post","link":"https:\/\/otus.ru\/journal\/chto-novogo-poyavilos-v-python-v-2021-godu\/","title":{"rendered":"\u0427\u0442\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0432 Python \u0432 2021 \u0433\u043e\u0434\u0443?"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_61 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/otus.ru\/journal\/chto-novogo-poyavilos-v-python-v-2021-godu\/#%D0%9A%D1%80%D0%B0%D1%82%D0%BA%D0%B0%D1%8F_%D0%B8%D1%81%D1%82%D0%BE%D1%80%D0%B8%D1%8F_Python\" title=\"\u041a\u0440\u0430\u0442\u043a\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f Python\">\u041a\u0440\u0430\u0442\u043a\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f Python<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/otus.ru\/journal\/chto-novogo-poyavilos-v-python-v-2021-godu\/#Whats_new_in_Python_39\" title=\"What&#8217;s new in Python 3.9?\">What&#8217;s new in Python 3.9?<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/otus.ru\/journal\/chto-novogo-poyavilos-v-python-v-2021-godu\/#%D0%A0%D0%B0%D0%B1%D0%BE%D1%82%D0%B0_%D1%81%D0%BE_%D1%81%D0%BB%D0%BE%D0%B2%D0%B0%D1%80%D1%8F%D0%BC%D0%B8\" title=\"\u0420\u0430\u0431\u043e\u0442\u0430 \u0441\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044f\u043c\u0438\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044f\u043c\u0438<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/otus.ru\/journal\/chto-novogo-poyavilos-v-python-v-2021-godu\/#%D0%98%D0%B7%D0%BC%D0%B5%D0%BD%D0%B5%D0%BD%D0%B8%D1%8F_%D0%B2_%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%B5_%D1%81_%D0%B4%D0%B5%D0%BA%D0%BE%D1%80%D0%B0%D1%82%D0%BE%D1%80%D0%B0%D0%BC%D0%B8\" title=\"\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/otus.ru\/journal\/chto-novogo-poyavilos-v-python-v-2021-godu\/#%D0%98%D0%B7%D0%BC%D0%B5%D0%BD%D0%B5%D0%BD%D0%B8%D1%8F_%D0%B2_%D1%81%D0%B8%D0%BD%D1%82%D0%B0%D0%BA%D1%81%D0%B8%D1%81%D0%B5_%D1%82%D0%B8%D0%BF%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F\" title=\"\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0435 \u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0435 \u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/otus.ru\/journal\/chto-novogo-poyavilos-v-python-v-2021-godu\/#%D0%94%D0%B6%D0%B5%D0%BD%D0%B5%D1%80%D0%B8%D0%BA%D0%B8\" title=\"\u0414\u0436\u0435\u043d\u0435\u0440\u0438\u043a\u0438\">\u0414\u0436\u0435\u043d\u0435\u0440\u0438\u043a\u0438<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/otus.ru\/journal\/chto-novogo-poyavilos-v-python-v-2021-godu\/#%D0%A0%D0%B0%D1%81%D1%88%D0%B8%D1%80%D0%B5%D0%BD%D0%B8%D0%B5_%D0%B2%D0%BE%D0%B7%D0%BC%D0%BE%D0%B6%D0%BD%D0%BE%D1%81%D1%82%D0%B5%D0%B9_%D0%B0%D0%BD%D0%BD%D0%BE%D1%82%D0%B0%D1%86%D0%B8%D0%B9\" title=\"\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439\">\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/otus.ru\/journal\/chto-novogo-poyavilos-v-python-v-2021-godu\/#%D0%98%D0%B7%D0%BC%D0%B5%D0%BD%D0%B5%D0%BD%D0%B8%D1%8F_%D1%81%D0%B2%D1%8F%D0%B7%D0%B0%D0%BD%D0%BD%D1%8B%D0%B5_%D1%81_%D1%87%D0%B0%D1%81%D0%BE%D0%B2%D1%8B%D0%BC%D0%B8_%D0%BF%D0%BE%D1%8F%D1%81%D0%B0%D0%BC%D0%B8\" title=\"\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0447\u0430\u0441\u043e\u0432\u044b\u043c\u0438 \u043f\u043e\u044f\u0441\u0430\u043c\u0438\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0447\u0430\u0441\u043e\u0432\u044b\u043c\u0438 \u043f\u043e\u044f\u0441\u0430\u043c\u0438<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/otus.ru\/journal\/chto-novogo-poyavilos-v-python-v-2021-godu\/#%D0%9D%D0%BE%D0%B2%D1%8B%D0%B5_%D0%BC%D0%B5%D1%82%D0%BE%D0%B4%D1%8B_%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D1%8B_%D1%81%D0%BE_%D1%81%D1%82%D1%80%D0%BE%D0%BA%D0%B0%D0%BC\" title=\"\u041d\u043e\u0432\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c\">\u041d\u043e\u0432\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/otus.ru\/journal\/chto-novogo-poyavilos-v-python-v-2021-godu\/#Python_310\" title=\"Python 3.10\">Python 3.10<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/otus.ru\/journal\/chto-novogo-poyavilos-v-python-v-2021-godu\/#Pattern_Matching\" title=\"Pattern Matching\">Pattern Matching<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/otus.ru\/journal\/chto-novogo-poyavilos-v-python-v-2021-godu\/#%D0%91%D0%BE%D0%BB%D0%B5%D0%B5_%D1%83%D0%B4%D0%BE%D0%B1%D0%BD%D0%BE%D0%B5_%D0%B8%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5_Union_%D0%B4%D0%BB%D1%8F_%D1%82%D0%B8%D0%BF%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F\" title=\"\u0411\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Union \u0434\u043b\u044f \u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:\">\u0411\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Union \u0434\u043b\u044f \u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/otus.ru\/journal\/chto-novogo-poyavilos-v-python-v-2021-godu\/#%D0%9A%D0%BE%D0%BD%D1%82%D0%B5%D0%BA%D1%81%D1%82%D0%BD%D1%8B%D0%B5_%D0%BC%D0%B5%D0%BD%D0%B5%D0%B4%D0%B6%D0%B5%D1%80%D1%8B\" title=\"\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0435 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u044b\">\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0435 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u044b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/otus.ru\/journal\/chto-novogo-poyavilos-v-python-v-2021-godu\/#%D0%91%D0%BE%D0%BB%D0%B5%D0%B5_%D0%B8%D0%BD%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%82%D0%B8%D0%B2%D0%BD%D1%8B%D0%B5_%D1%81%D0%BE%D0%BE%D0%B1%D1%89%D0%B5%D0%BD%D0%B8%D1%8F_%D0%BE%D0%B1_%D0%BE%D1%88%D0%B8%D0%B1%D0%BA%D0%B0%D1%85\" title=\"\u0411\u043e\u043b\u0435\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445\">\u0411\u043e\u043b\u0435\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/otus.ru\/journal\/chto-novogo-poyavilos-v-python-v-2021-godu\/#%D0%9E%D1%81%D1%82%D0%B0%D0%BB%D1%8C%D0%BD%D0%BE%D0%B5\" title=\"\u041e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435\">\u041e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%9A%D1%80%D0%B0%D1%82%D0%BA%D0%B0%D1%8F_%D0%B8%D1%81%D1%82%D0%BE%D1%80%D0%B8%D1%8F_Python\"><\/span>\u041a\u0440\u0430\u0442\u043a\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f Python<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p>Python \u0431\u044b\u043b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u043e\u043a\u043e\u043b\u043e \u0442\u0440\u0438\u0434\u0446\u0430\u0442\u0438 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434, \u043f\u0435\u0440\u0432\u0430\u044f \u0435\u0433\u043e \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0432\u044b\u0448\u043b\u0430 \u0432 1991 \u0433\u043e\u0434\u0443 \u0438 \u0438\u043c\u0435\u043b\u0430 \u043d\u043e\u043c\u0435\u0440 0.9. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u044f\u0437\u044b\u043a \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u043b\u0441\u044f, \u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c \u043e\u043d \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0432 2000-\u0445 \u0433\u043e\u0434\u0430\u0445, \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043c\u0430\u0436\u043e\u0440\u043d\u043e\u0439 \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u0443\u0436\u0435 \u0442\u043e\u0433\u0434\u0430 \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0432 \u044f\u0437\u044b\u043a\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b \u0441 \u0442\u0435\u043a\u0443\u0449\u0438\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u044e\u043d\u0438\u043a\u043e\u0434\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a. \u041e\u0434\u043d\u0430\u043a\u043e \u0432\u0442\u043e\u0440\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Python \u0431\u044b\u043b\u0430 \u0443\u0436\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430 \u043a \u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u043c\u0435\u043d\u0442\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0440\u0435\u0442\u044c\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043d\u0430\u0434 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0432\u0435\u043b\u0430\u0441\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441 \u0440\u0430\u0431\u043e\u0442\u043e\u0439 \u043d\u0430\u0434 2.7. \u0414\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0433\u043e \u0443 core-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 Python \u043d\u0435 \u0431\u044b\u043b\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043e \u0432\u0435\u0440\u0441\u0438\u0438 3.4 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0445\u0430\u043e\u0442\u0438\u0447\u043d\u044b.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/github.com\/tomasmor42\/new-in-python\/raw\/45a764a6bc8ffa8c6ed54d1852d0f2775c973bc1\/python_versions.png\" alt=\"python_versions\"\/><\/figure>\n\n\n\n<p>\u0421 2019 \u0433\u043e\u0434\u0430 Python \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u0443\u0435\u0442 \u0433\u043e\u0434\u0438\u0447\u043d\u044b\u0435 \u0440\u0435\u043b\u0438\u0437\u043d\u044b\u0435 \u0446\u0438\u043a\u043b\u044b. \u042d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432&nbsp;<a href=\"https:\/\/www.python.org\/dev\/peps\/pep-0602\/\">PEP-602<\/a>&nbsp;\u0427\u0442\u043e \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043e\u0435\u0439 Python?<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u043d\u043e\u0432\u0430\u044f \u043c\u0438\u043d\u043e\u0440\u043d\u0430\u044f (3.X.0) \u0432\u0435\u0440\u0441\u0438\u044f \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0433\u043e\u0434<\/li><li>\u0444\u0430\u0437\u0430 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0435\u0440\u0441\u0438\u0438 3.X+1.0 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u0432 \u0440\u0435\u043b\u0438\u0445 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f 3.X.beta \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442\u0441\u044f 12 \u043c\u0435\u0441\u044f\u0446\u0435\u0432<\/li><li>\u043a\u0430\u0436\u0434\u0430\u044f \u043c\u0438\u043d\u043e\u0440\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u043f\u043e\u043b\u0443\u0442\u043e\u0440\u0430 \u043b\u0435\u0442<\/li><li>\u043a\u0430\u0436\u0434\u0430\u044f \u043c\u0438\u043d\u043e\u0440\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u0442\u0440\u0435\u0445 \u0441 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u043e\u0439 \u043b\u0435\u0442 \u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0440\u0435\u043b\u0438\u0437\u043e\u0432 \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 3.9 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/github.com\/tomasmor42\/new-in-python\/raw\/45a764a6bc8ffa8c6ed54d1852d0f2775c973bc1\/pep-0602-example-release-calendar_bpiqwz0.png\" alt=\"release_calendar\"\/><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Whats_new_in_Python_39\"><\/span>What&#8217;s new in Python 3.9?<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p>\u0420\u0435\u043b\u0438\u0437 Python 3.9 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0435\u043b 2020-10-05. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043d\u043e\u0432\u043e\u0433\u043e \u0432 \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%A0%D0%B0%D0%B1%D0%BE%D1%82%D0%B0_%D1%81%D0%BE_%D1%81%D0%BB%D0%BE%D0%B2%D0%B0%D1%80%D1%8F%D0%BC%D0%B8\"><\/span>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044f\u043c\u0438<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043b\u043e\u0432\u0430\u0440\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0437\u043e\u0442\u0438\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c.<\/p>\n\n\n\n<p>\u0412 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u0434\u043e 3.9 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n\n\n\n<p>In&nbsp;[9]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pycon = {2017: \"Portland\", 2018: \"Cleveland\", 2019: \"Cleveland\", 2020: \"online\"}\neuropython = {2017: \"Rimini\", 2018: \"Edinburgh\", 2019: \"Basel\"}\n\n{**pycon, **europython}\n<\/pre>\n\n\n\n<p>Out[9]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{2017: 'Rimini', 2018: 'Edinburgh', 2019: 'Basel', 2020: 'online'}<\/pre>\n\n\n\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441&nbsp;<code>**<\/code>&nbsp;\u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u0438 \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f, \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0437\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u0442\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043d\u043e\u0432\u044b\u043c. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0434\u0435\u0439\u0442\u0441\u0432\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441:<\/p>\n\n\n\n<p>In&nbsp;[7]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">merged_dict = pycon.copy()\n<strong>for<\/strong> key, value <strong>in<\/strong> europython.items():\n    merged_dict[key] = value\nmerged_dict<\/pre>\n\n\n\n<p>Out[7]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{2017: 'Rimini', 2018: 'Edinburgh', 2019: 'Basel', 2020: 'online'}<\/pre>\n\n\n\n<p>\u0418\u043b\u0438 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n\n\n\n<p>In&nbsp;[8]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pycon.update(europython)\npycon<\/pre>\n\n\n\n<p>Out[8]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{2017: 'Rimini', 2018: 'Edinburgh', 2019: 'Basel', 2020: 'online'}<\/pre>\n\n\n\n<p>\u042d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0439\u0434\u043e\u0439\u0434\u0435\u0442 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c.<\/p>\n\n\n\n<p>In&nbsp;[14]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">merged_dict = pycon.copy().update(europython)<\/pre>\n\n\n\n<p>Out[14]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{2017: 'Portland', 2018: 'Cleveland', 2019: 'Cleveland', 2020: 'online'}<\/pre>\n\n\n\n<p>In&nbsp;[&nbsp;]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043d\u043e\u0432\u043e\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u0435, \u044d\u0442\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u043b\u044c\u0437\u044f, \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435<\/pre>\n\n\n\n<p>In&nbsp;[17]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">merged_dict <strong>is<\/strong> <strong>None<\/strong><\/pre>\n\n\n\n<p>Out[17]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">True<\/pre>\n\n\n\n<p>\u0412 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 collections \u0435\u0441\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 ChainMap, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u043e\u0436\u0435 \u043e\u0431\u0445\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u0438, \u043d\u043e \u0435\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 ChainMap, \u0430 \u043d\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u044c. \u041e\u043d \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0434\u0440\u0443\u0433 \u0437\u0430 \u0434\u0440\u0443\u0433\u043e\u043c. \u0415\u0441\u043b\u0438 \u0432\u0437\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u043b\u044e\u0447\u0443, \u0442\u043e \u0432\u0435\u0440\u043d\u0435\u0442\u0441\u044f \u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u043d\u044c\u0448\u0435. \u0422\u043e \u0435\u0441\u0442\u044c, \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u043b\u044f \u043a\u043b\u044e\u0447\u0430 2019, \u0432\u0435\u0440\u043d\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 Cleveland<\/p>\n\n\n\n<p>In&nbsp;[28]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>from<\/strong> <strong>collections<\/strong> <strong>import<\/strong> ChainMap\nmerged_dict = ChainMap(pycon, europython)\nmerged_dict<\/pre>\n\n\n\n<p>Out[28]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ChainMap({2017: 'Amsterdam', 2018: 'Cleveland', 2019: 'Cleveland', 2020: 'online'}, {2017: 'Rimini', 2018: 'Edinburgh', 2019: 'Basel'})<\/pre>\n\n\n\n<p>\u0412 Python 3.8 \u0431\u044b\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d walrus-\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440. \u0421 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441 update \u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0432 \u043d\u043e\u0432\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e:In&nbsp;[11]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">(merged_dict := pycon.copy()).update(europython)\nmerged_dict<\/pre>\n\n\n\n<p>Out[11]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{2017: 'Rimini', 2018: 'Edinburgh', 2019: 'Basel', 2020: 'online'}<\/pre>\n\n\n\n<p>\u0412 Python 3.9 \u0432&nbsp;<a href=\"https:\/\/www.python.org\/dev\/peps\/pep-0614\/\">PEP-0614<\/a>&nbsp;\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 | (\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a pipe), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u0443:<\/p>\n\n\n\n<p>In&nbsp;[13]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pycon | europython<\/pre>\n\n\n\n<p>Out[13]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{2017: 'Rimini', 2018: 'Edinburgh', 2019: 'Basel', 2020: 'online'}<\/pre>\n\n\n\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f:<\/p>\n\n\n\n<p>In&nbsp;[14]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pycon<\/pre>\n\n\n\n<p>Out[14]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{2017: 'Portland', 2018: 'Cleveland', 2019: 'Cleveland', 2020: 'online'}<\/pre>\n\n\n\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u043e\u043c |= (\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 +=): a |= b a = a|bIn&nbsp;[16]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pycon |= europython\npycon<\/pre>\n\n\n\n<p>Out[16]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{2017: 'Rimini', 2018: 'Edinburgh', 2019: 'Basel', 2020: 'online'}<\/pre>\n\n\n\n<p>\u0412\u0430\u0436\u043d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0437\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u044d\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0442\u0438\u0432\u043d\u0430.<\/p>\n\n\n\n<p>In&nbsp;[23]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">print(europython | pycon)\nprint(pycon | europython)<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">{2017: 'Portland', 2018: 'Cleveland', 2019: 'Cleveland', 2020: 'online'}\n{2017: 'Rimini', 2018: 'Edinburgh', 2019: 'Basel', 2020: 'online'}<\/pre>\n\n\n\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 | \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044f\u043c\u0438, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 ** \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0441 orderedict \u0438 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u044f\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%98%D0%B7%D0%BC%D0%B5%D0%BD%D0%B5%D0%BD%D0%B8%D1%8F_%D0%B2_%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%B5_%D1%81_%D0%B4%D0%B5%D0%BA%D0%BE%D1%80%D0%B0%D1%82%D0%BE%D1%80%D0%B0%D0%BC%D0%B8\"><\/span>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u0414\u043e \u0432\u0435\u0440\u0441\u0438\u0438 3.9 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043c\u043e\u0433\u043b\u0438 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u043b\u0438 \u043a\u043b\u0430\u0441\u0441\u044b, \u043d\u043e \u043d\u0435 \u0442\u0430\u043a\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043a\u0430\u043a \u0441\u043f\u0438\u0441\u043a\u0438 \u0438\u043b\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u0438. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0435\u0441\u0442\u044c UI-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u043a\u043d\u043e\u043f\u043a\u0430\u043c\u0438, \u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443. \u0411\u044b\u043b\u043e \u0431\u044b \u0443\u0434\u043e\u0431\u043d\u043e \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430, \u043d\u043e \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:In&nbsp;[&nbsp;]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">buttons = [QPushButton(f'Button <strong>{<\/strong>i<strong>}<\/strong>') <strong>for<\/strong> i <strong>in<\/strong> range(10)]\nbutton_0 = buttons[0]\nbutton_1 = buttons[1]\n\n@button_0.clicked.connect\n<strong>def<\/strong> say_hello():\n    message.setText(\"Hello, World!\")\n\n@button_1.clicked.connect\n<strong>def<\/strong> say_goodbye():\n    message.setText(\"Goodbye, World!\")<\/pre>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c list comprehension \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u044f\u0432\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043f\u0438\u0441\u043a\u0430, \u0438 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u0432. \u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043e\u0434\u043d\u0430\u043a\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e, \u0435\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u044b, \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u043d\u043e\u0433\u043e.<\/p>\n\n\n\n<p>\u042d\u0442\u043e \u043d\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431, \u043d\u043e \u0434\u0440\u0443\u0433\u0438\u0435 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u044b\u043c\u0438. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0432\u0430 \u0438\u0437 \u043d\u0438\u0445. \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0434\u043b\u044f \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e:In&nbsp;[&nbsp;]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>def<\/strong> _(x):\n    <strong>return<\/strong> x\n\n@_(buttons[0].clicked.connect)\n<strong>def<\/strong> say_hello():\n    ...<\/pre>\n\n\n\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435&nbsp;<code>eval<\/code>:In&nbsp;[&nbsp;]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">@eval(\"buttons[1].clicked.connect\")\n<strong>def<\/strong> say_bye():\n    ...<\/pre>\n\n\n\n<p>\u0412 Python 3.9 \u0441\u0442\u0430\u043b\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u044b \u0438\u0437 \u043b\u044e\u0431\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439. \u041c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0442\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n\n\n\n<p>In&nbsp;[&nbsp;]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">@buttons[0].clicked.connect\n<strong>def<\/strong> say_hello():\n    message.setText(\"Hello, World!\")\n\n@buttons[1].clicked.connect\n<strong>def<\/strong> say_goodbye():\n    message.setText(\"Goodbye, World!\")<\/pre>\n\n\n\n<p>\u041f\u043e\u0445\u043e\u0436\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0434\u043b\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044f:<\/p>\n\n\n\n<p>In&nbsp;[&nbsp;]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">buttons = {'hello': QPushButton('Hello!'), 'goodbye': QPushButton('Goodbye!')}\n@buttons['hello'].clicked.connect\n<strong>def<\/strong> say_hello():\n    message.setText(\"Hello, World!\")\n\n@buttons['goodbye'].clicked.connect\n<strong>def<\/strong> say_goodbye():\n    message.setText(\"Goodbye, World!\")<\/pre>\n\n\n\n<p>\u042d\u0442\u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043d\u0435 \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u0442 \u043d\u043e\u0432\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0447\u0438\u0441\u0442\u044b\u0439 \u043a\u043e\u0434 \u0438 \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c \u0440\u0438\u0441\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0432\u0440\u043e\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f&nbsp;<code>eval<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%98%D0%B7%D0%BC%D0%B5%D0%BD%D0%B5%D0%BD%D0%B8%D1%8F_%D0%B2_%D1%81%D0%B8%D0%BD%D1%82%D0%B0%D0%BA%D1%81%D0%B8%D1%81%D0%B5_%D1%82%D0%B8%D0%BF%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F\"><\/span>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0435 \u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%94%D0%B6%D0%B5%D0%BD%D0%B5%D1%80%D0%B8%D0%BA%D0%B8\"><\/span>\u0414\u0436\u0435\u043d\u0435\u0440\u0438\u043a\u0438<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u0414\u0436\u0435\u043d\u0435\u0440\u0438\u043a\u0438 \u044d\u0442\u043e \u0442\u0438\u043f\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u044b, \u043e\u0431\u044b\u0447\u043d\u043e \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 dict. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0436\u0435\u043d\u0435\u0440\u0438\u043a\u0438 \u044d\u0442\u043e \u0442\u0438\u043f\u044b, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u043a\u0430\u0437\u0430\u043d \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0442\u0438\u043f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 dict[str, int]<\/p>\n\n\n\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 Python 3.7 \u0441\u0442\u0430\u043b\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u0438\u0437\u0438\u0440\u0443\u044f \u0442\u0438\u043f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b. \u041d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438 \u0442\u0438\u043f\u044b \u043a\u0430\u043a&nbsp;<code>List<\/code>&nbsp;\u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u044f&nbsp;<code>typing<\/code>:<\/p>\n\n\n\n<p>In&nbsp;[&nbsp;]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>from<\/strong> <strong>typing<\/strong> <strong>import<\/strong> List, Dict\n<strong>def<\/strong> find(haystack: Dict[str, List[int]]) -&gt; int:\n<em>#def find(haystack: dict) -&gt; int:<\/em>\n    ...<\/pre>\n\n\n\n<p>\u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u0438\u043d\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0442\u0438\u043f\u044b dict \u0438 list. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443 \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044e, \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a Mypy \u0441\u0442\u0430\u043b\u0438 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u0434\u0436\u0435\u043d\u0435\u0440\u0438\u043a\u0438.<\/p>\n\n\n\n<p>\u0422\u0430\u043a\u0436\u0435, \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 3.9 \u0441\u0442\u0430\u043b\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c\u0438 \u0431\u0435\u0437 \u044f\u0432\u043d\u043e\u0433\u043e \u0438\u0445 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u044f&nbsp;<code>__future__<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%A0%D0%B0%D1%81%D1%88%D0%B8%D1%80%D0%B5%D0%BD%D0%B8%D0%B5_%D0%B2%D0%BE%D0%B7%D0%BC%D0%BE%D0%B6%D0%BD%D0%BE%D1%81%D1%82%D0%B5%D0%B9_%D0%B0%D0%BD%D0%BD%D0%BE%D1%82%D0%B0%D1%86%D0%B8%D0%B9\"><\/span>\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0431\u044b\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Python, \u043e\u0434\u043d\u0430\u043a\u043e \u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u0441\u043a\u043e\u0440\u0435\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043e\u043d\u0438 \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043b\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u0434\u043e Python 3.9 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n\n\n\n<p>In&nbsp;[24]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>def<\/strong> speed(distance: \"feet\", time: \"seconds\") -&gt; \"miles per hour\":\n    fps2mph = 3600 \/ 5280 \n    <strong>return<\/strong> distance \/ time * fps2mph<\/pre>\n\n\n\n<p>\u0412 Python 3.9 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 Annotated, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0434\u0432\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430, \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0438\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0431\u043b\u0430\u0434\u0430\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0440\u0438\u0443\u0435\u043c\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u044d\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438:<\/p>\n\n\n\n<p>In&nbsp;[&nbsp;]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>from<\/strong> <strong>typing<\/strong> <strong>import<\/strong> Annotated\n\n<strong>def<\/strong> speed(\n    distance: Annotated[float, \"feet\"], time: Annotated[float, \"seconds\"]) -&gt; Annotated[float, \"miles per hour\"]:\n    fps2mph = 3600 \/ 5280  \n    <strong>return<\/strong> distance \/ time * fps2mph<\/pre>\n\n\n\n<p>\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f &#171;\u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439&#187; \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445:<\/p>\n\n\n\n<p>In&nbsp;[25]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">speed.__annotations__<\/pre>\n\n\n\n<p>Out[25]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{'distance': 'feet', 'time': 'seconds', 'return': 'miles per hour'}<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%98%D0%B7%D0%BC%D0%B5%D0%BD%D0%B5%D0%BD%D0%B8%D1%8F_%D1%81%D0%B2%D1%8F%D0%B7%D0%B0%D0%BD%D0%BD%D1%8B%D0%B5_%D1%81_%D1%87%D0%B0%D1%81%D0%BE%D0%B2%D1%8B%D0%BC%D0%B8_%D0%BF%D0%BE%D1%8F%D1%81%D0%B0%D0%BC%D0%B8\"><\/span>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0447\u0430\u0441\u043e\u0432\u044b\u043c\u0438 \u043f\u043e\u044f\u0441\u0430\u043c\u0438<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Python, \u043c\u043e\u0434\u0443\u043b\u044c&nbsp;<code>datetime<\/code>&nbsp;\u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0447\u0430\u0441\u043e\u0432\u044b\u0445 \u043f\u043e\u044f\u0441\u0430\u0445, \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0438\u043c\u0438 \u0431\u044b\u043b\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430&nbsp;<code>python-dateutil<\/code>.<\/p>\n\n\n\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 Python 3.9 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c zoneinfo, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0447\u0430\u0441\u043e\u0432\u044b\u0445 \u043f\u043e\u044f\u0441\u0430\u0445 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435:<\/p>\n\n\n\n<p>In&nbsp;[31]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>from<\/strong> <strong>datetime<\/strong> <strong>import<\/strong> datetime, timezone\n<strong>from<\/strong> <strong>zoneinfo<\/strong> <strong>import<\/strong> ZoneInfo\nlocal_tz = ZoneInfo('Europe\/Amsterdam')\ndatetime.now(tz=timezone.utc), datetime.now()<\/pre>\n\n\n\n<p>Out[31]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">(datetime.datetime(2021, 5, 4, 15, 58, 36, 295472, tzinfo=datetime.timezone.utc),\n datetime.datetime(2021, 5, 4, 17, 58, 36, 295477))<\/pre>\n\n\n\n<p>\u0412 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0438 \u043e \u043a\u0430\u043a\u0438\u0445 \u0447\u0430\u0441\u043e\u0432\u044b\u0445 \u043f\u043e\u044f\u0441\u0430\u0445, \u043a\u0440\u043e\u043c\u0435 utc, \u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c&nbsp;<code>pytz<\/code>&nbsp;\u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0447\u0430\u0441\u043e\u0432\u043e\u043c \u043f\u043e\u044f\u0441\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u0435\u0437 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a:In&nbsp;[32]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>from<\/strong> <strong>zoneinfo<\/strong> <strong>import<\/strong> ZoneInfo\nlocal_tz = ZoneInfo('Europe\/Amsterdam')\ndatetime.now(tz=local_tz)<\/pre>\n\n\n\n<p>Out[32]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">(datetime.datetime(2021, 5, 4, 17, 58, 37, 765947, tzinfo=zoneinfo.ZoneInfo(key='Europe\/Amsterdam')),)<\/pre>\n\n\n\n<p>In&nbsp;[&nbsp;]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u0412\u0441\u0435\u0433\u043e \u0447\u0430\u0441\u043e\u0432\u044b\u0445 \u043f\u043e\u044f\u0441\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u043d\u0438\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 `zoneinfo`<\/pre>\n\n\n\n<p>In&nbsp;[33]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>import<\/strong> <strong>zoneinfo<\/strong>\ntzs = zoneinfo.available_timezones()\nlen(tzs)<\/pre>\n\n\n\n<p>Out[33]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">594<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%9D%D0%BE%D0%B2%D1%8B%D0%B5_%D0%BC%D0%B5%D1%82%D0%BE%D0%B4%D1%8B_%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D1%8B_%D1%81%D0%BE_%D1%81%D1%82%D1%80%D0%BE%D0%BA%D0%B0%D0%BC\"><\/span>\u041d\u043e\u0432\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0435 \u0438\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438\u0437 \u0441\u0442\u0440\u043e\u043a\u0438. \u0415\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434&nbsp;<code>strip<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c, \u043d\u043e \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0438\u043d\u043e\u0433\u0434\u0430 \u0434\u0430\u0432\u0430\u0442\u044c&nbsp;<a href=\"https:\/\/stackoverflow.com\/questions\/4148974\/removing-a-prefix-from-a-string\">\u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0435<\/a>&nbsp;<a href=\"https:\/\/bugs.python.org\/issue37114\">\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/a>&nbsp;\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435:<\/p>\n\n\n\n<p>In&nbsp;[34]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\"ababbbbbbaaccc\".lstrip(\"ab\")<\/pre>\n\n\n\n<p>Out[34]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">'ccc'<\/pre>\n\n\n\n<p>\u0412 Python 3.9 \u0431\u044b\u043b\u0438&nbsp;<a href=\"https:\/\/www.python.org\/dev\/peps\/pep-0616\/\">\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b<\/a>&nbsp;\u0444\u0443\u043d\u043a\u0446\u0438\u0438&nbsp;<code>removeprefix<\/code>,&nbsp;<code>removesuffix<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0442\u043e, \u0447\u0442\u043e \u043e\u0442 \u043d\u0438\u0445 \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f: \u0443\u0434\u0430\u043b\u044f\u044e\u0442 \u043f\u0435\u0440\u0432\u044b\u0435 \u0438\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0441\u0442\u0440\u043e\u043a\u0438.In&nbsp;[35]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\"ababbbbbbaaccc\".removeprefix(\"ab\")<\/pre>\n\n\n\n<p>Out[35]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">'abbbbbbaaccc'<\/pre>\n\n\n\n<p>In&nbsp;[36]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\"ababbbbbbaaccc\".removesuffix(\"c\")<\/pre>\n\n\n\n<p>Out[36]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">'ababbbbbbaacc'<\/pre>\n\n\n\n<p>In&nbsp;[36]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u0415\u0441\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0443\u0444\u0444\u0438\u043a\u0441 \u0438\u043b\u0438 \u043f\u0440\u0435\u0444\u0438\u043a\u0441, \u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u043d\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f.<\/pre>\n\n\n\n<p>In&nbsp;[37]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\"ababbbbbbaaccc\".removesuffix(\"something else\")<\/pre>\n\n\n\n<p>Out[37]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">'ababbbbbbaaccc'<\/pre>\n\n\n\n<p>\u0421\u0441\u044b\u043b\u043a\u0438:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/docs.python.org\/3\/whatsnew\/3.9.html#summary-release-highlights\">https:\/\/docs.python.org\/3\/whatsnew\/3.9.html#summary-release-highlights<\/a><\/li><\/ul>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Python_310\"><\/span>Python 3.10<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f Python 3.10 \u044d\u0442\u043e&nbsp;<a href=\"https:\/\/www.python.org\/downloads\/release\/python-3100b3\/\">0b3<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0448\u043b\u0430 17 \u0438\u044e\u043d\u044f 2021 \u0433\u043e\u0434\u0430. \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0440\u0435\u043b\u0438\u0437\u043e\u0432, \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u043b\u0438\u0437 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 \u043e\u043a\u0442\u044f\u0431\u0440\u0435 2021. \u041f\u043e\u043a\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u043b\u0438\u0437\u0430 \u043d\u0435\u0442, \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0445 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430\u0445 (\u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a brew). \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0435\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c, \u0431\u0438\u043b\u0434 \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441 www.python.org \u0438 \u0443\u0441\u0442\u0432\u043d\u043e\u0432\u0430\u0438\u0442\u044c \u043d\u0430 \u0441\u0432\u043e\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u0435. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0432 \u044d\u0442\u043e\u0439 Python 3.9.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Pattern_Matching\"><\/span>Pattern Matching<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u0412 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Python \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440:In&nbsp;[&nbsp;]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>if<\/strong> isinstance(x, tuple) <strong>and<\/strong> len(x) == 2:\n    host, port = x\n    mode = \"http\"\n<strong>elif<\/strong> isinstance(x, tuple) <strong>and<\/strong> len(x) == 3:\n    host, port, mode = x<\/pre>\n\n\n\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0432 Python 3.10 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441&nbsp;<a href=\"https:\/\/www.python.org\/dev\/peps\/pep-0635\/\">PEP-0635<\/a>&nbsp;\u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043d\u043e\u0432\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 match, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441 case:In&nbsp;[&nbsp;]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">match x:\n    case host, port:\n        mode = \"http\"\n    case host, port, mode:\n        <strong>pass<\/strong>\n    cass Class1:\n        ...\n    case host == 'localhost'\n    ...<\/pre>\n\n\n\n<p>\u0422\u0430\u043a\u0436\u0435 \u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0448\u0438\u0431\u043e\u043a:In&nbsp;[&nbsp;]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>def<\/strong> http_error(status):\n    match status:\n        case 400:\n            <strong>return<\/strong> \"Bad request\"\n        case 404:\n            <strong>return<\/strong> \"Not found\"\n        case 418:\n            <strong>return<\/strong> \"I'm a teapot\"\n        case _:\n            <strong>return<\/strong> \"Something's wrong with the Internet\"<\/pre>\n\n\n\n<p>\u042d\u0442\u043e \u043e\u0434\u043d\u043e \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 &#171;\u0433\u0440\u043e\u043c\u043a\u0438\u0445&#187; \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Python \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u0430\u043c\u043e\u0435 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0435 \u043a\u043e\u043c\u043c\u044c\u044e\u043d\u0438\u0442\u0438.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%91%D0%BE%D0%BB%D0%B5%D0%B5_%D1%83%D0%B4%D0%BE%D0%B1%D0%BD%D0%BE%D0%B5_%D0%B8%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5_Union_%D0%B4%D0%BB%D1%8F_%D1%82%D0%B8%D0%BF%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F\"><\/span>\u0411\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Union \u0434\u043b\u044f \u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u0415\u0441\u043b\u0438 \u0440\u0430\u043d\u044c\u0448\u0435 \u0447\u0442\u043e\u0431\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0438\u043f\u043e\u0432, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Union, \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0438\u0437 \u043f\u0430\u043a\u0435\u0442\u0430 typing:In&nbsp;[&nbsp;]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>from<\/strong> <strong>typing<\/strong> <strong>import<\/strong> Union\n\n<strong>def<\/strong> square(number: Union[int, float]) -&gt; Union[int, float]:\n    <strong>return<\/strong> number ** 2<\/pre>\n\n\n\n<p>\u0422\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 Python 3.10 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c pipe | \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0430:In&nbsp;[&nbsp;]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>def<\/strong> square(number: int | float) -&gt; int | float:\n    <strong>return<\/strong> number ** 2<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%9A%D0%BE%D0%BD%D1%82%D0%B5%D0%BA%D1%81%D1%82%D0%BD%D1%8B%D0%B5_%D0%BC%D0%B5%D0%BD%D0%B5%D0%B4%D0%B6%D0%B5%D1%80%D1%8B\"><\/span>\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0435 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u044b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u043c\u0438 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430\u043c\u0438 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u0441\u044f, \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0445 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043c&nbsp;<code>with<\/code>, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0442\u044c \u0438\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430:In&nbsp;[&nbsp;]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>with<\/strong> (\n    CtxManager1(),\n    CtxManager2()\n):\n    ...\n\n<strong>with<\/strong> (CtxManager1() <strong>as<\/strong> example,\n      CtxManager2()):\n    ...\n\n<strong>with<\/strong> (\n    CtxManager1() <strong>as<\/strong> example1,\n    CtxManager2() <strong>as<\/strong> example2\n):\n    ...<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%91%D0%BE%D0%BB%D0%B5%D0%B5_%D0%B8%D0%BD%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%82%D0%B8%D0%B2%D0%BD%D1%8B%D0%B5_%D1%81%D0%BE%D0%BE%D0%B1%D1%89%D0%B5%D0%BD%D0%B8%D1%8F_%D0%BE%D0%B1_%D0%BE%D1%88%D0%B8%D0%B1%D0%BA%D0%B0%D1%85\"><\/span>\u0411\u043e\u043b\u0435\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u041d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043e\u0431\u0449\u0435\u0435 \u0438 \u0441\u0430\u043c\u043e \u043f\u043e \u0441\u0435\u0431\u0435 \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e\u0431\u044b \u043e\u0448\u0438\u0431\u043a\u0443 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c. \u0412 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0438 Python core-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0443\u043b\u0443\u0447\u0448\u0438\u043b\u0438 \u0441\u0430\u043c\u044b\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u0435\u0435 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b\u043c\u0438:In&nbsp;[&nbsp;]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">expected = {9: 1, 18: 2, 19: 2, 27: 3, 28: 3, 29: 3, 36: 4, 37: 4,\n           ^\n<strong>SyntaxError<\/strong>: '{' was never closed<\/pre>\n\n\n\n<p>In&nbsp;[&nbsp;]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&gt;&gt;&gt; <strong>if<\/strong> rocket.position &gt; event_horizon\n  File \"&lt;stdin&gt;\", line 1\n    <strong>if<\/strong> rocket.position &gt; event_horizon\n                                      ^\n<strong>SyntaxError<\/strong>: expected ':'<\/pre>\n\n\n\n<p>In&nbsp;[&nbsp;]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&gt;&gt;&gt; {x,y <strong>for<\/strong> x,y <strong>in<\/strong> range(100)}\n  File \"&lt;stdin&gt;\", line 1\n    {x,y <strong>for<\/strong> x,y <strong>in<\/strong> range(100)}\n     ^\n<strong>SyntaxError<\/strong>: did you forget parentheses around the comprehension target?<\/pre>\n\n\n\n<p>In&nbsp;[&nbsp;]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>if<\/strong> rocket.position = event_horizon:\n  File \"&lt;stdin&gt;\", line 1\n    <strong>if<\/strong> rocket.position = event_horizon:\n                       ^\n<strong>SyntaxError<\/strong>: cannot assign to attribute here. Maybe you meant '==' instead<\/pre>\n\n\n\n<p>In&nbsp;[&nbsp;]:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>def<\/strong> foo():\n...    <strong>if<\/strong> lel:\n...    x = 2\n  File \"&lt;stdin&gt;\", line 3\n    x = 2\n    ^\n<strong>IndentationError<\/strong>: expected an indented block after 'if' statement <strong>in<\/strong> line 2<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%9E%D1%81%D1%82%D0%B0%D0%BB%D1%8C%D0%BD%D0%BE%D0%B5\"><\/span>\u041e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>\u041c\u043e\u0434\u0443\u043b\u044c distutils \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0432\u044b\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0437 \u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u043c \u0432 Python 3.12. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u044b\u043b\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u044b \u0442\u0430\u043a\u0438\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u043a\u0430\u043a setuptools \u0438 packaging.<\/li><li>\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 \u043c\u043e\u0434\u0443\u043b\u0435&nbsp;<a href=\"https:\/\/www.python.org\/dev\/peps\/pep-0626\/\">debugging<\/a><\/li><\/ul>\n\n\n\n<p>\u042d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043f\u0430\u0434\u0443\u0442 \u0432 Python 3.10, \u0441 \u043f\u043e\u043b\u043d\u044b\u043c \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432\u00a0<a href=\"https:\/\/docs.python.org\/3.10\/whatsnew\/changelog.html#changelog\">\u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439<\/a>.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u041f\u0440\u043e\u043a\u0430\u0447\u0430\u0442\u044c Python \u043c\u043e\u0436\u043d\u043e \u043d\u0430 \u043a\u0443\u0440\u0441\u0430\u0445:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/otus.pw\/7RoI\/\">Python Developer. Basic<\/a><\/li><li><a href=\"https:\/\/otus.pw\/9tLD\/\">Python Developer. Professional<\/a><\/li><li><a href=\"https:\/\/otus.pw\/Xd6U\/\">Web-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430 Python<\/a> <\/li><\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041a\u0440\u0430\u0442\u043a\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f Python Python \u0431\u044b\u043b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u043e\u043a\u043e\u043b\u043e \u0442\u0440\u0438\u0434\u0446\u0430\u0442\u0438 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434, \u043f\u0435\u0440\u0432\u0430\u044f \u0435\u0433\u043e \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0432\u044b\u0448\u043b\u0430 \u0432 1991 \u0433\u043e\u0434\u0443 \u0438 \u0438\u043c\u0435\u043b\u0430 \u043d\u043e\u043c\u0435\u0440 0.9. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u044f\u0437\u044b\u043a \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u043b\u0441\u044f, \u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c \u043e\u043d \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0432 2000-\u0445 \u0433\u043e\u0434\u0430\u0445, \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043c\u0430\u0436\u043e\u0440\u043d\u043e\u0439 \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u0443\u0436\u0435 \u0442\u043e\u0433\u0434\u0430 \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0432 \u044f\u0437\u044b\u043a\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b<\/p>\n","protected":false},"author":9,"featured_media":1503,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,1],"tags":[],"class_list":{"0":"post-1502","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-polza","8":"category-pro-it"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/posts\/1502","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/comments?post=1502"}],"version-history":[{"count":3,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/posts\/1502\/revisions"}],"predecessor-version":[{"id":1507,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/posts\/1502\/revisions\/1507"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/media\/1503"}],"wp:attachment":[{"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/media?parent=1502"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/categories?post=1502"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/tags?post=1502"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}