模式匹配在 Pythonic 原文: PyCoder’s Weekly - Issue #464 pycoder

  • 210317 Zoom.Quiet(大妈) 用时 42 分钟 完成快译
  • 210317 Zoom.Quiet(大妈) 用时 37 分钟 完成格式转抄.

  • Pythonic 的模式匹配教程
    • RODRIGO GIRÃO SERRÃO
    • • Shared by Rodrigo Girão Serrão Structural pattern matching is coming in Python 3.10. This article explores how to use it to write Pythonic code by searching for some of the best use cases for the match statement. Keep in mind that match is still in alpha, so, while unlikely, some things may still change before the final version of 3.10 is released. (是也乎: Pattern 在 Erlang 用老的形式, 终于进入 Python, 不过, 也只是刚刚开始, 远没浸入内核, 只能当成语法糖先. )
  • PyQt6 vs PySide6: 两种 Python Qt 库间有什么区别?
    • MARTIN FITZPATRICK There is a new version of Qt (version 6) and with it new versions of PyQt and PySide — now named PyQt6 & PySide6 respectively. Take a look at the latest versions of the libraries to identify the differences between them and find solutions for writing portable code. (是也乎: 表兄弟有什么不同? )
  • 用 Python/PyQt 和 SQLite 建立通讯录
    • REAL PYTHON In this step-by-step project, you’ll build a minimal contact book application using Python, with PyQt to build the application’s GUI and SQLite to handle the database. (是也乎: Contact 真正上手项目, 可以立即让你反感 GUI 编程… )
  • 用 Flask/htmx 和 Tailwind CSS 进行快速原型制作
    • AMAL SHAJI
    • • Shared by Amal Shaji Learn how to usee htmx and Tailwind CSS with Flask to quickly build interactive front-ends.
  • Mu 版本 1.1.0-Beta.2 已发布
    • MADEWITH.MU (是也乎: Mu 最萌 IDE 发布新版了 )

探讨/吐糟

Discussions


文章/教程/嗯哼

Articles, Tutorials and Talks

  • 如何用 Modin 加快 Pandas
    • MICHAEL GALARNYK
    • • Shared by Michael Galarnyk The pandas library provides easy-to-use data structures like pandas DataFrames as well as tools for data analysis. One issue with pandas is that it can be slow with large amounts of data. It wasn’t designed for analyzing 100 GB or 1 TB datasets. Fortunately, there is the Modin library which has benefits like the ability to scale your pandas workflows by changing one line of code. (是也乎: 其实追加内存是最快的加速 )
  • Navigating 用于部署 Python 应用程序的选项
    • REAL PYTHON
    • podcast What goes into the decision of how to host your Python code or application in the cloud? Which technology stack is the right size for your project? This week on the show, we have Calvin Hendryx-Parker. Calvin talks about cloud hosting options, infrastructure choices, and deployment tools. (是也乎: podcast )
  • Interfaces 和 Protocols
    • GLYPH LEFKOWITZ Now that Python developers have Mypy and Python’s built-in Protocol, is zope.interface a thing of the past? Can you replace every zope.interface with a Protocol? See how these two approaches to abstract types compare, and when it might make sense to stick with zope.interface. (是也乎: 界面和协议…嗯哼, 反转概念是习惯性动作了… zope.interface 一直没过时, 可想当年 Zope 创造了多少好东西? 毕竟是 老爹亲自嗯哼的哈… )
  • Python 三十岁: 对谈帮助 编程语言步入正轨的人
    • MAYANK SHARMA Pablo Galindo is a physicist, Python core-dev, and member of the Python steering council. He’s also the release manager for Python 3.10 and 3.11. Learn how he got involved with Python and read about his thoughts on the role of the steering council and Python’s future. (是也乎: Galindo )
  • Python 布尔值: 利用真理的价值
    • REAL PYTHON
    • course Learn about the built-in Python Boolean data type, which is used to represent the truth value of an expression. You’ll see how to use Booleans to compare values, check for identity and membership, and control the flow of your programs with conditionals. (是也乎: Booleans 中学知识.. 等等, 真理的力量? 这个广告辞很力的. )
  • 性能比较: Python,Go,C ++,C,AWK,Forth 和 Rust 的单词计数
    • BEN HOYT This article is less of a “my language is better than your” rant and more of an exploration into what idiomatic vs. optimized code looks like in various languages and where surprising bottlenecks lurk. (是也乎: 每年都有的对比, 不过, 这次有 Forth 很前沿哪… )
  • 介绍 Beanie: 异步 MongoDB ODM
    • ROMAN Beanie is a new asynchronous Python ODM (Object Document Mappter) for MongoDB based on Motor and Pydantic. Learn how Beanie’s data model works and see it in action in a minimal web application. (是也乎:
# Actual endpoint
@notes_router.get("/notes/{note_id}", response_model=Note)
async def get_note_by_id(
        # Helper usage with Depends annotation
        note: Note = Depends(get_note)
):
    return note

嗯哼, 这没什么变化哪… )

  • Python 社区专访: Ewa Jodlowska
    • REAL PYTHON Learn how Ewa Jodlowska, the executive director of the Python Software Foundation (PSF), started her tech journey and how COVID-19 affected the PSF and plans for PyCon US 2021. (是也乎: REAL )

好物/妙品/

Interesting Projects, Tools and Libraries, Projects & Code


📆🐍 活动/大会

Events, MeetUp 真的是全球线下活动组织中心


DAMA

❤️ Happy Pythonic ;-(大妈私人无责任播报)


PS


好文笔,感叹号年度配额: 2/3 投稿/反馈邮箱: [email protected] (邮件列表地址, 当成正常邮件发送邮件就好, 不用注册, 不用翻越…)

ZoomQuiet/大妈 就是四处 是也乎,( ̄▽ ̄) 的那个大妈:

私自嗯哼: ZoomQuiet (订阅号: ZoomQuiet42)
公开课程: 蟒营 (订阅号: Mainium)
历史吐糟: Chaos42 (订阅号 PythoniCamp)
as 创始组织者:
    PyChina (订阅号: PyChinaOrg)
    本地社区: 
        GDG珠海 (订阅号: GDG-ZhuHai)
        TFUG珠海 (订阅号: ZH_TFUG)

NN 4320 RPP