Issue 419

用 Python 生成无数独特光剑 原文: PyCoder’s Weekly - Issue #419 200506 Zoom.Quiet(大妈) 用时 42 分钟 完成快译 200506 Zoom.Quiet(大妈) 用时 37 分钟 完成格式转抄. Python 3.9 发布规划 PYTHON.ORG In last week’s issue we had the dates mixed up, here are the correct ones: 3.9.0 final is expected to be released on October 5, 2020. On May 18, 2020 3.9.0 beta 1 is going to be released, marking the start of the feature freeze phase. 为什么要记录测试 HYNEK SCHLAWACK Have you ever looked at a test you wrote six months or a year ago and thought, “I know what this test does but why did I test this?” Maybe you should document your tests. (是也乎: 那就直接用 doctest? ) 2020 Python 语言峰会 PYTHON SOFTWARE FOUNDATION This year’s Python Language Summit was held over videoconference. The PSF is posting summaries of the presentations as they become available. (是也乎: 在老爹离开的日子里, Python 果断努力变成 C# ) Regular Expressions: Python中的正则表达式 REAL PYTHON In previous tutorials in this series, you’ve seen several different ways to compare string values with direct character-by-character comparison. In this tutorial, you’ll learn how to perform more complex string pattern matching using regular expressions, or regexes, in Python. 用 Python 生成 10,000 多个独特的 8位 Lightsabers ADAM MCKERLIE • Shared by Adam McKerlie May the Fourth be with you! And also some Python! Adam McKerlie shows us how he used Pillow and Tweepy to make a Twitter bot that tweets a unique lightsaber every day. (是也乎: 神奇了, Jadi 光剑自动生成器, 为每一个小伙伴生成一柄唯一的. ) 探索用于 Python 开发的 Jupyter Notebook 替代方案 CHRIS MOFFITT For many people, the Jupyter Notebook has become the de facto tool for exploratory data analysis. But is it really the bee’s knees? (是也乎: Jupyter 有很多山寨小伙伴, 每一个都作的不错.特别是 VSCode. ) Python 3.9.0a6 现在可用于测试 PYTHON.ORG Django 错误修正版本: 3.0.6 DJANGO SOFTWARE FOUNDATION The Real Python 播客: Łukasz Langa 访谈 REAL PYTHON podcast Łukasz is the release manager for CPython and the creator of the Black code formatter. 讨论 Discussions ...

2020-05-06 · 4 min · 1931 words · ZoomQuiet

Issue 418

Pandas DataFrame: 使处理数据令人愉快 原文: PyCoder’s Weekly - Issue #418 200429 Zoom.Quiet(大妈) 用时 42 分钟 完成快译 200429 Zoom.Quiet(大妈) 用时 37 分钟 完成格式转抄. Python 2 最后的发布标志叕一个时代的终结 RYAN DONOVAN The final version of Python 2 has been released. As the Python community looks forward to the new era, Ryan Donovan from the Stack Overflow Blog takes some time to reflect on the transition and points out that, while support for Python 2 from official channels may be gone, the language isn’t dead. In fact, there’s reason to believe it will live on for decades to come. (是也乎: 再次: 不会的, Python 2.x 足以用到下个10年… ) 你应该了解的 Python 3.9 新特性 MARTIN HEINZ • Shared by Martin Heinz Python 3.9 is scheduled for release on May 10, 2020, and it’s packed full of new goodies. Explore these new features in this overview by Martin Heinz, including new dict operators, updates to the math module, new string methods, a functools.ToplogicalSorter class, and more! (是也乎: 实话, 并不想知道… 一个语言不是靠追加越来越多特性存活的… ) Python pickle 模块: 如何在 Python 中保存对象 REAL PYTHON In this tutorial, you’ll learn how you can use the Python pickle module to convert your objects into a stream of bytes that can be saved to a disk or sent over a network. You’ll also learn the security implications of using this process on objects from an untrusted source. (是也乎: pickle 绝对是 Python 内建模块中最迷人的一个, 谁都忍不住溢用她… ) 收集指导委员会问答的问题 PYTHON.ORG As part of PyCon US 2020, the Python Steering Council will record a Q&A. They are soliciting questions from the community, so here’s your chance to get your burning questions answered! (是也乎: 很认真, 也很无奈… ) 构造 Python 应用 (通用布局) REAL PYTHON course This course is a reference guide to common Python application layouts and project structures for command-line applications, web applications, and more. (是也乎: 的确, Python 程序其实,非常 八股文的… 输入->处理->输出, 没了… ) 讨论 Discussions ...

2020-04-29 · 6 min · 2639 words · ZoomQuiet

Issue 417

可以在 Zoom/Skype 中使用的替身 原文: PyCoder’s Weekly - Issue #417 200422 Zoom.Quiet(大妈) 用时 42 分钟 完成快译 200422 Zoom.Quiet(大妈) 用时 37 分钟 完成格式转抄. pip 20.1b1 发布, 包含新依赖性解析器 GITHUB.COM/PYPA The beta release of pip version 20.1 has dropped and included the next-generation dependency resolver! The resolver is currently turned off by default because it’s unstable and not ready for everyday use. The pip mainainters do encourage users to try it out, however, and feedback on the new resolver can be submitted by filling out a survey. (是也乎: 不过默认关闭着… ) Python 软件基金会新闻: 谢谢捐赠/赞助者 PSF BLOG “Thanks to [the] generosity of individual and corporate donors and decreasing PyCon 2020 expenses, we estimate that the PSF will now only need $141,713 from its financial reserve to get through 2020.” (是也乎: 嗯哼? 老爹在任时, 从没见这种嗯哼? ) Python 内建 Pathlib 其实很棒 REDOWAN DELOWAR • Shared by Redowan Delowar Python 3’s pathlib module has taken some time to gain traction since it was introduced in Python 3.4. After all, the os.path module had been the de facto tool for working with paths in Python. Why change code that works? Learn why pathlib is a better choice for working with file paths in Python in this thorough tutorial. Pytest 实效 Python 测试 REAL PYTHON In this tutorial, you’ll learn how to take your testing to the next level with pytest. You’ll cover intermediate and advanced pytest features such as fixtures, marks, parameters, and plugins. With pytest, you can make your test suites fast, effective, and less painful to maintain. (是也乎: 不过, 传统场景还是 unittest 为先吧? ) Python 2.7.18, 一个时代的终结 BENJAMIN PETERSON “Python 2.7.18 is a special release. I refer, of course, to the fact that ‘2.7.18’ is the closest any Python version number will ever approximate e, Euler’s number. Simply exquisite!” (是也乎: 放心, 俺一定会忠诚再用 42 年的… ) Python 编码面试: 提示和最佳做法 REAL PYTHON course Learn how to take your Python coding interview skills to the next level and use Python’s built-in functions and modules to solve problems faster and more easily. (是也乎: 关键还是用Python的内置函数和模块哪… ) 讨论 Discussions ...

2020-04-22 · 5 min · 2499 words · ZoomQuiet

Issue 416

嫑再将你 Python 模块命名为 utils 原文: PyCoder’s Weekly - Issue #416 200415 Zoom.Quiet(大妈) 用时 42 分钟 完成快译 200415 Zoom.Quiet(大妈) 用时 37 分钟 完成格式转抄. 用 Python 和 OpenCV 开源工具实现虚拟背景 BENJAMIN ELDER With so much of the world stuck at home thanks to the COVID-19 pandemic, more and more workplaces are using video conferencing solutions—such as Zoom—to bring work to your living room. Or kitchen. Or bedroom. Or bathroom. OK… hopefully not that last one! Why not spice up your video conferencing with some awesome, homemade virtual backgrounds built with Python and OpenCV? (是也乎: 用一个简单例子来描述, 开源世界机械视觉最常见的应用… ) 继承与组成: Python OOP指南 REAL PYTHON course Learn about inheritance and composition in Python. You’ll improve your object-oriented programming (OOP) skills by understanding how to use inheritance and composition and how to leverage them in their design. (是也乎: 很多 OOP 概念都是在特殊场景中才感觉舒服的… 但是,我们学习使用却反过来, 先尝试理解各种模型, 再去撞场景… ) 嫑再将你 Python 模块命名为 utils SEBASTIAN BUCZYŃSKI opinion “Do not use utils as a name for your Python module neither put it into a class name. Try to be more specific about the role of code – e.g. create a place for validators, services or factories. If the role criterion doesn’t help and you really dealing with utils, try grouping code by its theme.” (是也乎: utils 已经变成垃圾箱了… 最好给出真正有意义的模块名 ) 从分块到并行: 借助 Dask 加速 Pandas ITAMAR TURNER-TRAURING In a recent article, Itamar Turner-Trauring discussed how to read large datasets with Pandas using a chunking technique to reduce memory overhead. Chunking has another advantage: it enables parallelism, which can dramatically speed up processing time. Learn why and how to enable parallelism for your Pandas processing code using the Dask library. 数据科学: 现实不符合预期 DAN FRIEDMAN opinion “Seven common ways a data science role may not meet your expectations through tens of data scientist interviews and anecdotes from popular media.” Also see the related discussion on Hacker News 如何在 pytest 中为 Django 模型提供测试装置 REAL PYTHON In this step-by-step tutorial, you’ll learn how to use fixtures to simplify your testing in pytest. If you use Django, pytest fixtures can help you write tests that are painless to update and maintain even as you make changes to your models. PyPy 7.3.1 发布 PYPY BLOG 讨论 Discussions ...

2020-04-15 · 5 min · 2476 words · ZoomQuiet