{"id":8132,"date":"2018-08-26T17:42:41","date_gmt":"2018-08-26T17:42:41","guid":{"rendered":"http:\/\/blog.bachi.net\/?p=8132"},"modified":"2019-09-04T10:41:58","modified_gmt":"2019-09-04T10:41:58","slug":"python-3-file","status":"publish","type":"post","link":"https:\/\/blog.bachi.net\/?p=8132","title":{"rendered":"Python 3 File"},"content":{"rendered":"<p><a href=\"https:\/\/stackoverflow.com\/questions\/7409780\/reading-entire-file-in-python\">Reading entire file in Python<\/a><br \/>\n<a href=\"https:\/\/docs.python.org\/3\/tutorial\/inputoutput.html\">The Python Tutorial &#8211; Input and Output<\/a><br \/>\n<a href=\"https:\/\/lerner.co.il\/2015\/01\/18\/dont-use-python-close-files-answer-depends\/\">If you don\u2019t use \u201cwith\u201d, when does Python close files? The answer is: It depends.<\/a><br \/>\n<a href=\"https:\/\/askubuntu.com\/questions\/701491\/is-closing-a-file-after-having-opened-it-with-open-required-in-python\">Is closing a file after having opened it with `open()` required in Python? <\/a><br \/>\n<a href=\"https:\/\/stackoverflow.com\/questions\/7395542\/is-explicitly-closing-files-important\">Is explicitly closing files important?<\/a><br \/>\n<a href=\"https:\/\/www.python.org\/dev\/peps\/pep-0343\/\">PEP 343 &#8212; The &#8220;with&#8221; Statement<\/a><br \/>\n<a href=\"https:\/\/www.quora.com\/When-would-one-use-as-in-Python\">When would one use &#8220;as&#8221; in Python?<\/a><br \/>\n<a href=\"https:\/\/pythontic.com\/concepts\/keywords\/as\">As Keyword In Python<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Reading entire file in Python The Python Tutorial &#8211; Input and Output If you don\u2019t use \u201cwith\u201d, when does Python close files? The answer is: It depends. Is closing a file after having opened it with `open()` required in Python? Is explicitly closing files important? PEP 343 &#8212; The &#8220;with&#8221; Statement When would one use [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8132","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/8132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8132"}],"version-history":[{"count":7,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/8132\/revisions"}],"predecessor-version":[{"id":9976,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/8132\/revisions\/9976"}],"wp:attachment":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}