Py 3.12 预览版: 更好的错误消息

原文: PyCoder's Weekly - Issue #572

pycoder

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

Python 3.12 will be released in October 2023. In this tutorial, you’ll preview one of its upcoming features: even more precise error messages that’ll help you debug your code more efficiently.

(是也乎:

3.12

差点儿看成 315 ...

)

Good build systems help teams, and a monorepo approach is an excellent way to do that. This article describes the structure and tooling of a monorepo for Python projects.

Dane Hillard, author of “Publishing Python Packages” is interviewed about packaging and the rich ecosystem of Python tooling.


探讨/吐糟

Discussions

(是也乎:

考据党最爱标题...

)


文章/教程/嗯哼

Articles, Tutorials and Talks

“In computer science, syntactic sugar is syntax within a programming language that is designed to make things easier to read or to express. It makes the language ‘sweeter’ for human use: things can be expressed more clearly, more concisely, or in an alternative style that some may prefer.”

(是也乎:

嗯哼? 这完全是一本书的内容体量了....

)

In this tutorial, you’ll learn how Python’s del statement works and how to use it in your code. This statement will allow you to remove references from different scopes, items from lists, keys from dictionaries, and members from classes. This will lead to potentially memory-efficient code.

(是也乎:

del

是的, Python 中隐藏了多少贴心操作哪... 想想头皮发麻...

)

The “ReAct” pattern for Large Language Models defines how to give the model access to the outside world through actions. For example, allowing it to hit Wikipedia to gather more data when asked a question. This article briefly describes some such actions.

“Algebraic Data Types (not to be confused with abstract data types) can transform certain types of invalid states from runtime errors into type-checking errors, making them an excellent method for representing data and managing state.”

Python type hints can be used in five different ways: interactive programming help, static type checking, runtime behavior determination, documentation, and compiler instructions. Read on to learn more about each case.

(是也乎:

人民群众叕开始整活儿了..

)

When you experiment with a new-to-you data science skill, you need some sort of data to work with. Why be boring? This article talks about several available data sets you can use when you practice your coding skills.

Are you tired of manually tracking changes to your Django models? Say hello to django-simple-history! This powerful package allows you to easily keep track of modifications made to your models over time.

FawltyDeps is a new tool to help you identify undeclared and unused dependencies in your Python code, making your projects leaner and more reproducible.

(是也乎:

这种原本都是基础工具,早就应该在 pip 阶段进行检验的, 就是因为 Python 足够鲁棒不怕折腾, 这才一直拖到现在...

)

Structural pattern matching was first introduced in Python 3.10 and is based on ideas from Scala and other functional languages. Learn how to use it and why in this post.

This article describe the journey of mwparserfromhtml, a tool for dealing with the XML data dumps from Wikimedia.

Learn about vector databases and embeddings. Covers building a FastAPI layer to semantically query the Enron email dataset.

This tutorial shows how to build an intelligent educational platform using OpenAI’s GPT-3 and Django.

(是也乎:

不是, 这就是一层壳哪...

)


好物/妙品/...

Interesting Projects, Tools and Libraries, Projects & Code

(是也乎:

应该是 py2rust 了哪...

)

(是也乎:

上次用脸编码的程序猿, 这次用全身进行编码了... 那么, 工作真的和健身结合在一起了...

Keyboard

就是姿势设计的猥琐了...

)


📆🐍 活动/大会

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


历史上的这周


DAMA

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

      _~^+∽~_
  \) /  ♡ ◕  \ ()
    '_   ⎕   _'
    ( '--⌄--' \

...act by ferris-actor v0.2.4 (built on 23.0303.201916)

PS:

Happy Pythoning!

Copyright © 2023 PyCoder’s Weekly, All rights reserved.

PPS:

不觉中蟒周刊快译已经到了第10+2个年头

开始有小伙伴加入承担 pythonisa 周刊的翻译, 从来没提醒过, 可就这么默默坚持下来了...

问为什么:

[皱眉]每周新闻资讯 怎么能错过 
看看有什么新东西 
当有新的发现时:
    what f**k 还能这样玩? 还有这东西?
    每周开彩蛋[吃瓜]

无法同意更多... 很多社区贡献看起来辛苦, 其实受益最多的, 就是主动承担者也.

所以++> 锈周刊 -> Weekly :: China


好文笔,感叹号年度配额: 2/3

投稿/反馈邮箱:

askdama@googlegroups.com

(邮件列表地址, 当成正常邮件发送邮件就好, 不用注册, 不用翻越...)


ZoomQuiet/大妈

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

私自嗯哼: ZoomQuiet (订阅号: ZoomQuiet42)
公开课程: 蟒营 (订阅号: Mainium)
历史吐糟: Chaos42 (订阅号 PythoniCamp)

as 创始组织者:
    PyChina (订阅号: PyChinaOrg)
    本地社区: 
        GDG珠海 (订阅号: GDG-ZhuHai)
        TFUG珠海 (订阅号: ZH_TFUG)


Comments


大妈的多重宇宙 - YouTube

全新自媒体系列...科学幻想,读书,说故事...
点击注册~> 获得 100$ 体验券: DigitalOcean Referral Badge

订阅 substack 体验古早写作:
Zoom.Quiet’s Chaos42 | Substack


关注公众号, 持续获得相关各种嗯哼:
zoomquiet


蟒营®编程思维提高班Python版

**2021.01.11** 因大妈再次创业暂停定期开设, 转换为预约触发:
  • + 任何问题, 随时邮件提问可也:
    askdama@googlegroups.com
-->