{"id":277213,"date":"2016-03-29T16:57:03","date_gmt":"2016-03-29T12:57:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=277213"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=277213","title":{"rendered":"\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 Python \u2014 \u043a\u0443\u0440\u0441 \u0434\u043b\u044f \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u0443\u0437\u043d\u0430\u0442\u044c \u043e \u043d\u0451\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043b\u0438 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f"},"content":{"rendered":"<br \/>\n<blockquote><p>&quot;The joy of coding Python should be in seeing short, concise, readable classes that express a lot of action in a small amount of clear code \u2014 not in reams of trivial code that bores the reader to death.&quot;<br \/>  Guido van Rossum<\/p><\/blockquote>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8ff\/395\/eb2\/8ff395eb233f451ea76527bfc1903ea2.png\" align=\"left\"\/><br \/>  <a href=\"http:\/\/python.org\">Python<\/a> \u2014 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c. \u041c\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u0442\u0440\u0438\u043d\u0430\u0434\u0446\u0430\u0442\u044c \u043b\u0435\u043a\u0446\u0438\u0439 <a href=\"https:\/\/compscicenter.ru\/courses\/python\/2015-autumn\/\">\u043e\u0441\u0435\u043d\u043d\u0435\u0433\u043e \u043a\u0443\u0440\u0441\u0430<\/a> CS \u0446\u0435\u043d\u0442\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0433\u043b\u0443\u0431\u044c \u044f\u0437\u044b\u043a\u0430 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438. \u041b\u0435\u043a\u0446\u0438\u0438 \u0447\u0438\u0442\u0430\u0435\u0442 <a href=\"https:\/\/github.com\/superbobry\">\u0421\u0435\u0440\u0433\u0435\u0439 \u041b\u0435\u0431\u0435\u0434\u0435\u0432<\/a>, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 JetBrains \u0438 \u043f\u0440\u0435\u043f\u043e\u0434\u0430\u0432\u0430\u0442\u0435\u043b\u044c \u0432 Computer Science Center. <\/p>\n<p>  \u041c\u0430\u043b\u043e \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441, \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f: \u043d\u0443\u0436\u043d\u043e \u043e\u0441\u043e\u0437\u043d\u0430\u0442\u044c \u0438\u0434\u0438\u043e\u043c\u044b \u044f\u0437\u044b\u043a\u0430 \u0438 \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c. \u0412 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u0443\u0440\u0441\u0430 \u0421\u0435\u0440\u0433\u0435\u0439 \u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442 \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u0435\u0439 \u0441 \u0438\u0434\u0438\u043e\u043c\u0430\u043c\u0438 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u044f\u0437\u044b\u043a\u0430 Python.<br \/>  <br clear=\"all\"\/>  <sub>\u0424\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f \u0441\u0434\u0435\u043b\u0430\u043d\u0430 \u043e\u0441\u0435\u043d\u044c\u044e 2014 \u0433\u043e\u0434\u0430 \u0432 \u0421\u0442\u0440\u0430\u0441\u0431\u0443\u0440\u0433\u0435, \u0437\u0430 \u0434\u0432\u0435 \u043d\u0435\u0434\u0435\u043b\u0438 \u0434\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u0443\u0440\u0441\u0430. <\/sub><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u041b\u0435\u043a\u0446\u0438\u0438 \u043a\u0443\u0440\u0441\u0430<\/h2>\n<p>  \u0412\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u0441\u0435\u0445 \u043b\u0435\u043a\u0446\u0438\u0439 <a href=\"https:\/\/youtu.be\/5V7XG1mGiHc?list=PLlb7e2G7aSpTTNp7HBYzCBByaE1h54ruW\">\u0432 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442\u0435<\/a> \u043d\u0430 YouTube.<\/p>\n<h1><a href=\"https:\/\/compscicenter.ru\/courses\/python\/2015-autumn\/classes\/1364\/\">\u041d\u0430\u0447\u0430\u043b\u043e<\/a><\/h1>\n<p>  \u041a\u0442\u043e, \u043a\u043e\u0433\u0434\u0430 \u0438 \u0437\u0430\u0447\u0435\u043c \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b \u044f\u0437\u044b\u043a Python. \u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u044b \u044f\u0437\u044b\u043a\u0430. \u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u044f\u0437\u044b\u043a\u0430 \u0441 \u0432\u044b\u0441\u043e\u0442\u044b \u043f\u0442\u0438\u0447\u044c\u0435\u0433\u043e \u043f\u043e\u043b\u0451\u0442\u0430. \u0418\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0430 IPython.<\/p>\n<h1><a href=\"https:\/\/compscicenter.ru\/courses\/python\/2015-autumn\/classes\/1386\/\">\u0412\u0441\u0451, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0437\u043d\u0430\u0442\u044c \u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0432 Python<\/a><\/h1>\n<p>  \u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0423\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f. \u041e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u043f\u0440\u0430\u0432\u0438\u043b\u043e LEGB, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b <code>global<\/code> \u0438 <code>nonlocal<\/code>. \u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0424\u0443\u043d\u043a\u0446\u0438\u0438 <code>map<\/code>, <code>filter<\/code> \u0438 <code>zip<\/code>. \u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u043f\u0438\u0441\u043a\u043e\u0432, \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432 \u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439. \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e PEP 8.<\/p>\n<h1><a href=\"https:\/\/compscicenter.ru\/courses\/python\/2015-autumn\/classes\/1387\/\">\u0414\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u044b \u0438 \u043c\u043e\u0434\u0443\u043b\u044c functools<\/a><\/h1>\n<p>  \u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u0432. \u0414\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u044b \u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438, \u0431\u0435\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u0432. \u041c\u043e\u0434\u0443\u043b\u044c <code>functools<\/code>.<\/p>\n<h1><a href=\"https:\/\/compscicenter.ru\/courses\/python\/2015-autumn\/classes\/1388\/\">\u0421\u0442\u0440\u043e\u043a\u0438, \u0431\u0430\u0439\u0442\u044b, \u0444\u0430\u0439\u043b\u044b \u0438 \u0432\u0432\u043e\u0434\/\u0432\u044b\u0432\u043e\u0434<\/a><\/h1>\n<p>  \u0421\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b \u0438 \u0441\u044b\u0440\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438. \u0421\u0442\u0440\u043e\u043a\u0438 \u0438 \u042e\u043d\u0438\u043a\u043e\u0434. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438. \u041c\u043e\u0434\u0443\u043b\u044c <code>string<\/code>. \u0411\u0430\u0439\u0442\u044b. \u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0438. \u0424\u0430\u0439\u043b\u044b \u0438 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b. \u041c\u0435\u0442\u043e\u0434\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438. \u041c\u043e\u0434\u0443\u043b\u044c <code>io<\/code>.<\/p>\n<h1><a href=\"https:\/\/compscicenter.ru\/courses\/python\/2015-autumn\/classes\/1476\/\">\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0438 \u043c\u043e\u0434\u0443\u043b\u044c collections<\/a><\/h1>\n<p>  \u0418 \u0441\u043d\u043e\u0432\u0430 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438: \u043a\u043e\u0440\u0442\u0435\u0436, \u0441\u043f\u0438\u0441\u043e\u043a, \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e, \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u2014 \u043e\u0431\u0445\u043e\u0434 \u0432 \u0433\u043b\u0443\u0431\u0438\u043d\u0443, \u043e\u0431\u0437\u043e\u0440 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043f\u0440\u0438\u043c\u0435\u0440\u044b. \u041f\u043e\u0447\u0442\u0438 \u0432\u0441\u0451 \u043f\u0440\u043e \u043c\u043e\u0434\u0443\u043b\u044c <code>collections<\/code>: \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u0440\u0442\u0435\u0436\u0438, \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0438, <code>defaultdict<\/code>, <code>OrderedDict<\/code>.<\/p>\n<h1><a href=\"https:\/\/compscicenter.ru\/courses\/python\/2015-autumn\/classes\/1477\/\">\u041a\u043b\u0430\u0441\u0441\u044b, \u0447\u0430\u0441\u0442\u044c 1<\/a><\/h1>\n<p>  \u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0438 \u043d\u0435\u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, <code>__dict__<\/code>, <code>__slots__<\/code>. \u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u043a\u043b\u0430\u0441\u0441\u0430. \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440  @property. \u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435, \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f super. \u0414\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u044b \u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u041c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b.<\/p>\n<h1><a href=\"https:\/\/compscicenter.ru\/courses\/python\/2015-autumn\/classes\/1520\/\">\u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u044b \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430<\/a><\/h1>\n<p>  \u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u0437\u0430\u0447\u0435\u043c \u043e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b \u0438 \u043a\u0430\u043a \u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c. \u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b <code>BaseException<\/code> \u0438 <code>Exception<\/code>. \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b <code>try...except..else..finally<\/code>. \u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u044b \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u043c\u043e\u0434\u0443\u043b\u044c <code>contextlib<\/code>.<\/p>\n<h1><a href=\"https:\/\/compscicenter.ru\/courses\/python\/2015-autumn\/classes\/1542\/\">\u0418\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b, \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0438 \u043c\u043e\u0434\u0443\u043b\u044c itertools<\/a><\/h1>\n<p>  \u0414\u0432\u0430 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432: <code>__next__<\/code> + <code>__iter__<\/code> \u0438 <code>__getitem__<\/code>. \u0418\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0438 \u0446\u0438\u043a\u043b <code>for<\/code>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b <code>in<\/code> \u0438 <code>not in<\/code>. \u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440-\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code>yield<\/code>. \u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043a\u0430\u043a: \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b, \u0441\u043e\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u044b \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430. \u041c\u043e\u0434\u0443\u043b\u044c <code>itertools<\/code>.<\/p>\n<h1><a href=\"https:\/\/compscicenter.ru\/courses\/python\/2015-autumn\/classes\/1556\/\">\u041c\u043e\u0434\u0443\u043b\u0438, \u043f\u0430\u043a\u0435\u0442\u044b \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u043c\u043f\u043e\u0440\u0442\u0430<\/a><\/h1>\n<p>  \u041c\u043e\u0434\u0443\u043b\u0438. \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b <code>import<\/code> \u0438 <code>from ... import<\/code>. \u041f\u0430\u043a\u0435\u0442\u044b. \u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0439 \u0438\u043c\u043f\u043e\u0440\u0442. <code>__init__<\/code>-\u0444\u0430\u0441\u0430\u0434. \u0418 \u0441\u043d\u043e\u0432\u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>import<\/code> \u2014 \u043e\u0431\u0445\u043e\u0434 \u0432 \u0433\u043b\u0443\u0431\u0438\u043d\u0443.<\/p>\n<h1><a href=\"https:\/\/compscicenter.ru\/courses\/python\/2015-autumn\/classes\/1559\/\">\u041a\u043b\u0430\u0441\u0441\u044b, \u0447\u0430\u0441\u0442\u044c 2<\/a><\/h1>\n<p>  \u0414\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u044b: \u0447\u0442\u043e-\u043a\u0430\u043a-\u0437\u0430\u0447\u0435\u043c. \u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 <code>__new__<\/code>, \u043a\u043b\u0430\u0441\u0441 <code>type<\/code> \u0438 \u043c\u0435\u0442\u0430\u043a\u043b\u0430\u0441\u0441\u044b. \u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432. \u041c\u043e\u0434\u0443\u043b\u0438 <code>abc<\/code> \u0438 <code>collections.abc<\/code>.<\/p>\n<h1><a href=\"https:\/\/compscicenter.ru\/courses\/python\/2015-autumn\/classes\/1560\/\">\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/a><\/h1>\n<p>  \u0417\u0430\u0447\u0435\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c? \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0435 \u0438 \u0434\u043e\u043a\u0442\u0435\u0441\u0442\u044b. \u041c\u043e\u0434\u0443\u043b\u044c <code>unittest<\/code>. \u041f\u0430\u043a\u0435\u0442 <code>py.test<\/code> \u2014 \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043b\u0443\u0447\u0448\u0435. \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0438 \u043f\u0430\u043a\u0435\u0442 <code>hypothesis<\/code>.<\/p>\n<h1><a href=\"https:\/\/compscicenter.ru\/courses\/python\/2015-autumn\/classes\/1561\/\">\u0411\u044b\u0441\u0442\u0440\u0435\u0435, Python, \u0435\u0449\u0451 \u0431\u044b\u0441\u0442\u0440\u0435\u0435<\/a><\/h1>\n<p>  \u0418\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u0434\u0430 \u043d\u0430 Python \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0443\u043b\u0435\u0439 <code>timeit<\/code>, <code>cProfile<\/code> \u0438 <code>line_profiler<\/code>. \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e NumPy. JIT \u0438 AOT \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u043a\u043e\u0434\u0430 \u043d\u0430 Python \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 Numba \u0438 Cython.<\/p>\n<h1><a href=\"https:\/\/compscicenter.ru\/courses\/python\/2015-autumn\/classes\/1562\/\">\u041c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0438 GIL<\/a><\/h1>\n<p>  \u041c\u043e\u0434\u0443\u043b\u0438 <code>threading<\/code>, <code>queue<\/code> \u0438 <code>concurrent.futures<\/code>. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043d\u0430 Python. GIL. \u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c. \u041c\u043e\u0434\u0443\u043b\u044c <code>asyncio<\/code>. \u041c\u043e\u0434\u0443\u043b\u044c <code>multiprocessing<\/code>.<\/p>\n<h1>\u0427\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435<\/h1>\n<p>  \u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u0443\u0440\u0441\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u0430\u043c CS \u0446\u0435\u043d\u0442\u0440\u0430, \u0443\u0447\u0430\u0449\u0438\u0435\u0441\u044f <a href=\"https:\/\/compscicenter.ru\/enrollment\/\">\u043d\u0430\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f<\/a> \u0440\u0430\u0437 \u0432 \u0433\u043e\u0434, \u0432\u0435\u0441\u043d\u043e\u0439. \u0422\u0435\u043c, \u043a\u0442\u043e \u043f\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0432 \u0446\u0435\u043d\u0442\u0440\u0435, \u043c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u043d\u0435 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435 \u0432\u0438\u0434\u0435\u043e \u043a\u0443\u0440\u0441\u0430, \u0430 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0448\u0430\u0442\u044c \u043d\u0430 Python \u0441\u0432\u043e\u0438 \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438, \u0432\u0435\u0434\u044c \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0432 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438 \u044f\u0437\u044b\u043a\u0430 \u2014 \u044d\u0442\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430. <\/p>\n<p>  \u0414\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u0435\u0441\u0442\u044c \u0441\u043f\u0438\u0441\u043a\u0438 \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/github.com\/akullpp\/awesome-java\">Awesome Java<\/a>, <a href=\"https:\/\/github.com\/qinwf\/awesome-R\">Awesome R<\/a> \u0438 <a href=\"https:\/\/github.com\/fffaraz\/awesome-cpp\">Awesome C++<\/a>. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0442\u0430\u043a\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0435\u0441\u0442\u044c \u0438 \u0434\u043b\u044f <a href=\"https:\/\/github.com\/vinta\/awesome-python\">Python<\/a>. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445, \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0441\u043c\u0435\u043b\u043e \u0438\u0434\u0438\u0442\u0435 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u0434\u0435\u043b \u0441\u043f\u0438\u0441\u043a\u0430 \u0437\u0430 \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0435\u043d\u0438\u0435\u043c.                 <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/280426\/\"> https:\/\/habrahabr.ru\/post\/280426\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<br \/>\n<blockquote><p>&quot;The joy of coding Python should be in seeing short, concise, readable classes that express a lot of action in a small amount of clear code \u2014 not in reams of trivial code that bores the reader to death.&quot;<br \/>  Guido van Rossum<\/p><\/blockquote>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8ff\/395\/eb2\/8ff395eb233f451ea76527bfc1903ea2.png\" align=\"left\"\/><br \/>  <a href=\"http:\/\/python.org\">Python<\/a> \u2014 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c. \u041c\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u0442\u0440\u0438\u043d\u0430\u0434\u0446\u0430\u0442\u044c \u043b\u0435\u043a\u0446\u0438\u0439 <a href=\"https:\/\/compscicenter.ru\/courses\/python\/2015-autumn\/\">\u043e\u0441\u0435\u043d\u043d\u0435\u0433\u043e \u043a\u0443\u0440\u0441\u0430<\/a> CS \u0446\u0435\u043d\u0442\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0433\u043b\u0443\u0431\u044c \u044f\u0437\u044b\u043a\u0430 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438. \u041b\u0435\u043a\u0446\u0438\u0438 \u0447\u0438\u0442\u0430\u0435\u0442 <a href=\"https:\/\/github.com\/superbobry\">\u0421\u0435\u0440\u0433\u0435\u0439 \u041b\u0435\u0431\u0435\u0434\u0435\u0432<\/a>, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 JetBrains \u0438 \u043f\u0440\u0435\u043f\u043e\u0434\u0430\u0432\u0430\u0442\u0435\u043b\u044c \u0432 Computer Science Center. <\/p>\n<p>  \u041c\u0430\u043b\u043e \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441, \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f: \u043d\u0443\u0436\u043d\u043e \u043e\u0441\u043e\u0437\u043d\u0430\u0442\u044c \u0438\u0434\u0438\u043e\u043c\u044b \u044f\u0437\u044b\u043a\u0430 \u0438 \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c. \u0412 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u0443\u0440\u0441\u0430 \u0421\u0435\u0440\u0433\u0435\u0439 \u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442 \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u0435\u0439 \u0441 \u0438\u0434\u0438\u043e\u043c\u0430\u043c\u0438 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u044f\u0437\u044b\u043a\u0430 Python.<br \/>  <br clear=\"all\"\/>  <sub>\u0424\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f \u0441\u0434\u0435\u043b\u0430\u043d\u0430 \u043e\u0441\u0435\u043d\u044c\u044e 2014 \u0433\u043e\u0434\u0430 \u0432 \u0421\u0442\u0440\u0430\u0441\u0431\u0443\u0440\u0433\u0435, \u0437\u0430 \u0434\u0432\u0435 \u043d\u0435\u0434\u0435\u043b\u0438 \u0434\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u0443\u0440\u0441\u0430. <\/sub>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-277213","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=277213"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277213\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=277213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=277213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=277213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}