{"id":13545725,"url":"https://github.com/ethan-funny/explore-python","last_synced_at":"2025-04-02T16:30:46.931Z","repository":{"id":37416888,"uuid":"72061131","full_name":"ethan-funny/explore-python","owner":"ethan-funny","description":":green_book: The Beauty of Python Programming.","archived":false,"fork":false,"pushed_at":"2023-02-07T10:05:14.000Z","size":4973,"stargazers_count":2612,"open_issues_count":10,"forks_count":627,"subscribers_count":99,"default_branch":"master","last_synced_at":"2024-11-03T12:33:10.495Z","etag":null,"topics":["gitbook","python"],"latest_commit_sha":null,"homepage":"https://funhacks.gitbooks.io/explore-python/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ethan-funny.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-27T01:55:17.000Z","updated_at":"2024-11-01T08:50:24.000Z","dependencies_parsed_at":"2023-02-19T16:25:15.249Z","dependency_job_id":null,"html_url":"https://github.com/ethan-funny/explore-python","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethan-funny%2Fexplore-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethan-funny%2Fexplore-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethan-funny%2Fexplore-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethan-funny%2Fexplore-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethan-funny","download_url":"https://codeload.github.com/ethan-funny/explore-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246850749,"owners_count":20844137,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gitbook","python"],"created_at":"2024-08-01T11:01:12.243Z","updated_at":"2025-04-02T16:30:46.622Z","avatar_url":"https://github.com/ethan-funny.png","language":"Python","readme":"![cover](https://i.loli.net/2020/03/23/9B1oWLeu6Q3Hbrz.png)\n\nPython 之旅\n===\n\n![Version](https://img.shields.io/badge/version-1.0-brightgreen.svg)\n[![License: CC BY-NC-ND 4.0](https://img.shields.io/badge/License-CC%20BY--NC--ND%204.0-brightgreen.svg)](https://raw.githubusercontent.com/ethan-funny/explore-python/master/LICENSE)\n\n## Python 简介\n\nPython 诞生于 1989 年的圣诞期间，由 [Guido van Rossum](https://gvanrossum.github.io/) 开发而成，目前 Guido 仍然是 Python 的主要开发者，主导着 Python 的发展方向，Python 社区经常称呼他为『仁慈的独裁者』。\n\nPython 是一门面向对象，解释型的高级程序设计语言，它的语法非常简洁、优雅，而这也是 Python 的一些设计哲学。Python 自带了很完善的库，涵盖了数据库，网络，文件处理，GUI 等方方面面，通过这些库，我们可以比较快速地解决一些棘手问题，也可以将其作为基础库，开发出一些高级库。\n\n目前 Python 在大部分领域都占有一席之地，比如 Web 开发，机器学习，科学计算等。不少大型网站都是使用 Python 作为后台开发语言的，比如 [YouTube](https://www.youtube.com/)、[Pinterest](https://www.pinterest.com/)、国内的[豆瓣](https://www.douban.com/)和[知乎](http://www.zhihu.com/)等。\n\n另外，有不少知名的机器学习库也是使用 Python 开发的，比如，[scikit-learn](http://scikit-learn.org/stable/) 是一个强大的机器学习库，[PyTorch](https://pytorch.org/) 是一个成熟的深度学习库。\n\n当然了，Python 也有一些缺点。Python 经常被人们吐槽的一点就是：运行速度慢，和 C/C++ 相比非常慢。但是，除了像视频高清解码等**计算密集型任务**对运行速度有较高的要求外，在大部分时候，我们可能并不需要非常快的运行速度。比如，一个程序使用 C 来实现，运行时间只需 0.01 秒，而使用 Python 来实现，需要 0.1 秒，虽然 Python 的运行时间是 C 的 10 倍，显然很慢，但对我们而言，这压根不是问题。\n\n## 关于本书\n\n本书是我学习和使用 Python 的总结。在学习和使用 Python 的过程中，我作了不少笔记，并对一些笔记进行了加工和完善，发表在博客上。随着笔记的增加，我就萌生了写一本书的想法，希望能比较系统地总结相关知识，巩固自己的知识体系，而不是停留在『感觉好像懂了』的状态中。\n\n有了想法之后，接下来就要开始写了。当然，从产生想法到付诸实践还是纠结了一段时间，毕竟，作笔记和写书很不一样啊。思想斗争过后，我下定决心要把它写出来。\n\n首先，我参考一些相关的书籍，作了一个基础的思维导图，如下：\n\n![思维导图](https://i.loli.net/2020/03/23/uZN8aehmwl14XcG.png)\n![Eng journy](PYTHONroadmap.png)\n\n接下来，就要开始写作了，这也是最艰难的一关。\n\n我没有按照从头到尾的顺序写，而是从最感兴趣的知识点入手，比如函数式编程、类的使用等等。就这样，一点一点地写，实在不想写了，就先搁置一下，过两天继续写。\n\n我在写作的过程中，给自己提了一个要求：**尽量深入浅出，条理清晰**。至于是否达到了，希望读者们多多批评指正，并给我提意见和建议。\n\n本书的每章基本上都是独立的，读者可以挑选感兴趣的章节进行阅读。目前本书有 15 个章节：\n\n- 第 1 章：介绍一些基础知识，包括 Python 中的输入和输出，字符编码。\n- 第 2 章：介绍常用数据类型，比如字符串、列表和字典等。\n- 第 3 章：介绍函数的定义和函数参数魔法。\n- 第 4 章：介绍 Python 中的函数式编程，包括匿名函数、闭包和装饰器等。\n- 第 5 章：介绍 Python 中类的使用，包括类方法、静态方法、super 和元类的使用等。\n- 第 6 章：介绍 Python 中的高级特性，比如生成器，上下文管理器。\n- 第 7 章：介绍文件和目录操作，os 的使用。\n- 第 8 章：介绍使用 Python 处理进程、线程和协程。\n- 第 9 章：异常处理。\n- 第 10 章：单元测试。\n- 第 11 章：正则表达式，re 模块的使用。\n- 第 12 章：HTTP 服务，requests 模块的使用。\n- 第 13 章：一些标准模块的使用，比如 argparse、collections 和 datetime 等。\n- 第 14 章：一些第三方模块的使用。\n- 第 15 章：结束语。\n\n本书的编码环境：\n\n- Python 版本以 2.7 为主，同时也会指出在 Python3 中的相应变化\n- 操作系统使用 macOS，代码结果，尤其是内存地址等由于运行环境的不同会存在差异\n\n本书将会持续进行修订和更新，读者如果遇到问题，请及时向我反馈，我会在第一时间加以解决。\n\n\n## 声明\n\n\u003ca rel=\"license\" href=\"https://creativecommons.org/licenses/by-nc-nd/4.0/\"\u003e\u003cimg alt=\"Creative Commons License\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png\" /\u003e\u003c/a\u003e\n\n本书由 [Ethan](https://github.com/ethan-funny) 编写，采用 [CC BY-NC-ND 4.0](https://creativecommons.org/licenses/by-nc-nd/4.0/deed.zh) 协议发布。\n\n这意味着你可以在非商业性使用的前提下自由转载，但必须：\n\n1. 保持署名\n2. 不对本书进行修改\n\n## 更新记录\n\n| 时间 | 说明 |\n| :---: | :---: |\n| 2017-01-03 | 发布版本 v1.0 |\n| 2019-02-09 | fix typo      |\n\n\n## 支持我\n\n如果你觉得本书对你有所帮助，不妨请我喝杯咖啡，感谢支持！\n\n\u003cimg src='https://i.loli.net/2020/03/23/Vx26BFnYOtZWoTl.png' width='600'\u003e\n\n\n","funding_links":[],"categories":["Python","书籍","Python (1887)"],"sub_categories":["3. Course and Code"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethan-funny%2Fexplore-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethan-funny%2Fexplore-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethan-funny%2Fexplore-python/lists"}