Issue 407

Guido 老爹义劝快乐的为 Python 提贡献吧 原文: PyCoder’s Weekly - Issue #407 200205 Zoom.Quiet(大妈) 用时 42 分钟 完成快译 200205 Zoom.Quiet(大妈) 用时 17 分钟 完成格式转抄. 通过比较流行的项目模板了解 Python 工具的最佳实践 JONAS KEMPER “Use Flake8, pytest, and Sphinx in your current Python project. Also evaluate pre-commit, black, and Pylint. For your next project, consider adding poetry and Dependabot.” (是也乎: 老爹对结果呛声指点更加实在的… @gvanrossum You missed mypy. Simpler docs use markdown, not ReST (Sphinx). Black is overrated unless your team argues over style a lot. You don’t need Pylint if you’re using flake8. Never heard of poetry or dependabot. And you should use a CI solution, e.g. Travis-CI, to run your tests. ) ...

2020-02-12 · 6 min · 2744 words · ZoomQuiet

Issue 406

值得收藏的22个最常用 Python 模块 原文: PyCoder’s Weekly - Issue #406 200205 Zoom.Quiet(大妈) 用时 42 分钟 完成快译 200205 Zoom.Quiet(大妈) 用时 17 分钟 完成格式转抄. 如何下架 Python 2 从而提升开发人员幸福感 BARRY WARSAW “Now that LinkedIn engineering has fully embraced Python 3, we no longer have to worry about supporting Python 2 and have seen our support loads decrease. We can now depend on the latest open source libraries and tools, and free ourselves from the constrictions of having to write bilingual Python.” (是也乎: LinkedIn 的故事教导我们… ) Python " != " 不是 " is not “: 对象对比在 Python REAL PYTHON In this quick and practical tutorial, you’ll learn when to use the Python is, is not, == and != operators. You’ll see what these comparison operators do under the hood, dive into some quirks of object identity and interning, and define a custom class. (是也乎: 好可爱的插图, 油号不匹配真的会出大事儿的 ) 适用 Python 的简洁代码概念 RIGEL DI SCALA “Software engineering principles, from Robert C. Martin’s book Clean Code, adapted for Python. This is not a style guide. It’s a guide to producing readable, reusable, and refactorable software in Python.” 世界上 22 个最常用的Python软件包 ERIK-JAN VAN BAAREN “As a starting point, I took a list of the most downloaded Python packages on PyPI over the past 365 days. Let’s dive in and find out what they do, how they’re related, and why they rank so high!” (是也乎: 最具价值的模块, 多数没收录在内建中: Urllib3; Six(2->3 自动兼容); botocore, boto3, s3transfer, awscli (云厂商专用模块); Pip;Python-dateutil;Requests; S3transfer;Certifi(SSL 支持模块我); Idna(民族文化); PyYAML(越来越常用的); Pyasn1;Docutils;Chardet; RSA; Jmespath(叕一个 JSON 支持); Setuptools;Pytz;Futures; Colorama;Simplejson; 都是百万级别的下载量… ) 2020 我将如何测试 JAMES BENNETT “Everything I’m currently doing for testing my personal [Python] projects, and the reasoning for why I do things the way I do.” Interesting read if you’re looking to optimize your testing setup. (是也乎: 私人项目才玩的起高科技哪, 越是大项目, 越应该选择无聊的技术桟. ) Django 安全笑柄发布: 3.0.3, 2.2.10, and 1.11.28 DJANGOPROJECT.COM Fixes CVE-2020-7471: Potential SQL injection via StringAgg(delimiter) (是也乎: Django 现在分裂为几个大产品线,是否正确, 还有待市场检验. ) Pandas 1.0.0 新特性 (稳定版) PYDATA.ORG (是也乎: 等了10多年的 1.0 版本 ) 讨论 Discussions ...

2020-02-05 · 4 min · 1995 words · ZoomQuiet

Issue 405

Python 3.9.0a3 现在可用于测试 原文: PyCoder’s Weekly - Issue #405 200129 Zoom.Quiet(大妈) 用时 42 分钟 完成快译 200129 Zoom.Quiet(大妈) 用时 17 分钟 完成格式转抄. 用 Tkinter 进行 Python GUI 编程 REAL PYTHON In this article, you’ll learn the basics of GUI programming with Tkinter, the de-facto Python GUI framework. Master GUI programming concepts such as widgets, geometry managers, and event handlers. Then, put it all together by building two applications: a temperature converter and a text editor. Pythonic Code Review [2016] ILYA ETINGOF “In this article I’ll focus on my personal experience in authoring and reviewing Python code from both psychological and technical perspectives. And I’ll do so keeping in mind the ultimate goal of striking a balance between code reviews being enjoyable and technically fruitful.” (是也乎: 为什么总感觉私人经验比团队经验要来的靠谱? ) pip 20.0 已发布 PYPA.IO Default to doing a user install (as if –user was passed) when the main site-packages directory is not writeable and user site-packages are enabled, cache wheels built from Git requirements, and more. (是也乎: 终于, 20个大版本了, 终于支持 NPM 样的本地模块支持 ) Python 3.9 兼容性变更 KARTHIKEYAN SINGARAVELAN “With the EoL of Python 2 being in line with development of Python 3.9 there were changes made to Python 3.9 that broke a lot of packages since many deprecation warnings became errors.” (是也乎: 老爹退休, Python 就开始了 Chrome 刷版本般节奏… ) 关于如何为 Python 安装软件包的快速入门指南 BRETT CANNON “If you just want to start poking at Python and want to avoid the pitfalls to installing packages globally, it only takes 3 steps to do the right thing.” Python 3.9.0a3 现在可用于测试 PYTHONINSIDER.BLOGSPOT.COM Changelog at the link. 讨论 Discussions NIL ...

2020-01-29 · 3 min · 1307 words · ZoomQuiet

Issue 404

404 了啊啊啊啊… 原文: PyCoder’s Weekly - Issue #404 200115 Zoom.Quiet(大妈) 用时 42 分钟 完成快译 200115 Zoom.Quiet(大妈) 用时 17 分钟 完成格式转抄. 在N皇后问题上对比 Python, Go 和 C++ (PDF) PASCAL FUA, KRZYSZTOF LIS “Python currently is the dominant language in the field of Machine Learning but is often criticized for being slow to perform certain tasks. In this report, we use the well-known N-queens puzzle as a benchmark to show that once compiled using the Numba compiler it becomes competitive with C++ and Go in terms of execution speed while still allowing for very fast prototyping.” (是也乎: 叕一则对比 ) Codemodding Python: 将 Unittest 断言声明为 Python 断言 HANS-WILHELM WARLO Large codebases require continued maintenance, but it is time-consuming and cumbersome to change portions of code scattered around many files. This article shows how to write codemods to refactor Python code using its Abstract Syntax Tree—gaining far more granular control than basic regex and search-replace. Arcade: Python 游戏框架入门 REAL PYTHON In this step-by-step tutorial, you’ll learn how to use arcade, a modern Python framework for crafting games with compelling graphics and sound. Object-oriented and built for Python 3.6 and up, arcade provides you a modern set of tools for crafting great Python game experiences. (是也乎: ) 创建一个简单的 Python Pip 存储库 JAN-PIET MENS “I wanted the simplest (i.e. most lightweight) possible repository capable of serving packages in such a way as that Python’s pip would be able to install them.” 编写多语言脚本 NKANAEV.GITHUB.IO Python and Ruby have somewhat similar syntaxes, could you come up with a program that’s valid in both languages? 讨论 Discussions NIL ...

2020-01-23 · 3 min · 1366 words · ZoomQuiet