通过练习学 Python 的生成器/协程
原文: PyCoder's Weekly - Issue #451
- 201216 Zoom.Quiet(大妈) 用时 42 分钟 完成快译
- 201216 Zoom.Quiet(大妈) 用时 37 分钟 完成格式转抄.
- Python 位运算符
- REAL PYTHON
In this tutorial, you’ll learn how to use Python’s bitwise operators to manipulate individual bits of data at the most granular level. With the help of hands-on examples, you’ll see how you can apply bitmasks and overload bitwise operators to control binary data in your code.
(是也乎:
回到汇编 ;-)
)
- 用 mypy 进行详尽检查
- HAKI BENITA
What if mypy could warn you about possible problems at “compile time”? In this article, you’ll learn a little trick to get mypy to fail when a value in an enumeration type is left unhandled.
- 用 Python 安排各种定期作业
- TOWARDSDATASCIENCE.COM
- • Shared by Martin Heinz
Every software developer, data scientist, and sysadmin must, at some point, schedule jobs to run. In this article, you’ll learn how to do this with Python. You’ll encounter a number of methods for scheduling jobs, from using the standard library to leveraging third-party packages.
(是也乎:
嚓, 这口气大了, 也的确需要
)
- Python 的对象物件系统如何运作
- VICTOR
The Python object system is one of the most important parts of the Python language. Mastering it is essential to mastering the Python language. Learn how the object system works by examining the CPython source code in this detailed tutorial.
(是也乎:
灵魂追问了, 从代码上看, 老爹也一直在纠结ing....
)
- 什么是数据工程/是否适合您?
- REAL PYTHON
In this article, you’ll get an overview of the discipline of data engineering. You’ll learn what is and isn’t part of a data engineer’s job, who data engineers work with, and why data engineers play a crucial role in many industries.
(是也乎:
扫盲贴 ;-)
)
- Python 软件基金会 2020 募捐者
- PYTHON.ORG
Help the PSF recover funds lost due to COVID-19.
(是也乎:
等等, 哪儿? 俺也得捐.
)
-
PyTorch 1.7.1 发布: 更新 Python 3.9 二进制文件
- GITHUB.COM/PYTORCH
-
- PYTHON.ORG
-
- QT.IO
- • Shared by Bartosz Zaczyński
(是也乎:
嚓了, 真.活久见
)
探讨/吐糟
Discussions
- 为什么正等号适用于列表和字典?
- STACK OVERFLOW
The docs for the .iadd() special method don’t make it clear why it works for collections like lists and dictionaries. Time to peruse some CPython source code!
文章/教程/嗯哼
Articles, Tutorials and Talks
- Python 结构模式再次匹配形态
- JAKE EDGE
Follow the saga of PEP 622 which proposes to add a new structural pattern matching feature to Python. There have been a number of updates to the PEP, as well as some animated discussion in the Python-dev mailing list.
- 通过练习学习Python 的生成器/协程
- REAL PYTHON
- podcast
Have you started to use generators in Python? Are you unsure why you would even use one over a regular function? How do you use the special “send” method and the “yield from” syntax? This week on the show, we have Reuven Lerner to talk about his PyCon Africa 2020 talk titled “Generators, coroutines, and nanoservices.”
(是也乎:
)
- 面向初学者的 Python Turtle
- REAL PYTHON
- course
In this step-by-step course, you’ll learn the basics of Python programming with the help of a simple and interactive Python library called turtle. If you’re a beginner to Python, then this course will definitely help you on your journey as you take your first steps into the world of programming.
(是也乎:
永远的小乌龟 ;-)
不过, 针对儿童吧, 对成人感觉没什么帮助, 刺激点不对.
)
- 俺的 Evolution Writing JSON-REST APIs
- PHILIP JONES
After writing JSON-REST APIs for a number of years, Philip Jones noticed that there were shortcomings with documenting API structure and validating data sent and received. In this article, Philip discusses how he solved both of these issues with the quart-schema package.
- 地图和 Django: GeoDjango, SpatiaLite 以及 Leaflet
- PAOLO MELCHIORRE
In part one of this series, you’ll get a quickstart guide to creating web maps with the Python-based web framework Django using its module GeoDjango, the SQLite database with its spatial extension SpatiaLite and Leaflet, a JavaScript library for interactive maps.
(是也乎:
虽然, Pg 们内置了强大的 GEO 系列能力, 但是, 反应到 Django 框架中, 还得有个反应时期...
)
- 在 Python 中实施 Rust 的 dbg!
- RAPHAEL
Rust’s dbg macro is a useful expression printer that adds the source line to what is printed. In this article, Raphael shows you how to implement a similar function in Python and discusses many of the intricacies involved with inspecting code states.
(是也乎:
来了, 反正流行什么, fans 就住 Python 中 mix 什么. 而且都成功了.
)
- 通过并发加速 Python
- REAL PYTHON
- course
Learn what concurrency means in Python and why you might want to use it. You’ll see a simple, non-concurrent approach and then look into why you’d want threading, asyncio, or multiprocessing.
(是也乎:
反正,就是要快...
)
- 用 Graphene,SQLAlchemy 和 oso 进行 GraphQL 授权
- DAVID HATCH
- • Shared by Stephie Glaser
Learn how to set up a GraphQL authorization layer between Graphene and SQLAlchemy using oso’s open-source authorization library and the sqlalchemy-oso package.
好物/妙品/...
Interesting Projects, Tools and Libraries, Projects & Code
- dirsearch: Web 路径扫描程序
- GITHUB.COM/MAUROSORIA
(是也乎:
来自 毛里求斯
)
-
visidata: 用于发现和整理数据的终端电子表格复合工具
- GITHUB.COM/SAULPW
-
- GITHUB.COM/AIRSPEED-VELOCITY
-
py-applescript: 用以 NSAppleScript 的易用 Python 包装器
- GITHUB.COM/RDHYEE
-
- GITHUB.COM/OSOHQ
(是也乎:
策略工程
哗, 这 Bigger 突破天际.
)
-
beartype: 纯 Python 实现的, 快到飞溅的 O(1) 运行时类型检查
- GITHUB.COM/BEARTYPE
-
quart-schema: Quart 的模式验证和自动文档
- GITLAB.COM/PGJONES
📆🐍 活动/大会
Events, MeetUp 真的是全球线下活动组织中心
- ⋅ Real Python Office Hours (Virtual)
- December 16, 2020
(是也乎:
硬广, 但是, 足够有趣 ;-)
)
-
- January 30 – 31, 2021
-
- February 19 – 21, 2021
-
- May 12 – 18, 2021
- PyCon2020中国, 明年见
- 11.28~29
- 在线
(是也乎:
并实锤可用神器: NixOS - NixOS Linux
nix 可以跨语言非Docker 将开发和运行时环境精确锁定.
以及 PyCon19广州 的坑终于填上了:
基于Django的无代码Admin + 低代码开发框架
)
DAMA
❤️ Happy Pythonic ;-(
大妈私人无责任播报
)
None
PS:
好文笔,感叹号年度配额: 2/3
投稿/反馈邮箱:
askdama@googlegroups.com
(邮件列表地址, 当成正常邮件发送邮件就好, 不用注册, 不用翻越...)
ZoomQuiet/大妈
就是四处 是也乎,( ̄▽ ̄)
的那个大妈:
私自嗯哼: ZoomQuiet (订阅号: ZoomQuiet42)
公开课程: 蟒营 (订阅号: Mainium)
历史吐糟: Chaos42 (订阅号 PythoniCamp)
as 创始组织者:
PyChina (订阅号: PyChinaOrg)
本地社区:
GDG珠海 (订阅号: GDG-ZhuHai)
TFUG珠海 (订阅号: ZH_TFUG)
NN 4229
Comments