为什么 Python 如此神奇
原文: PyCoder's Weekly - Issue #590
- 230816 Zoom.Quiet(大妈) 用时 13 分钟 完成格式转抄.
- 230816 Zoom.Quiet(大妈) 用时 37 分钟 完成快译,
- 如何注释返回 self 的方法
- REAL PYTHON
In this tutorial, you’ll learn how to use the Self type hint in Python to annotate methods that return an instance of their own class. You’ll gain hands-on experience with type hints and annotations of methods that return an instance of their class, making your code more readable and maintainable.
(是也乎:
)
- 用 Python 创建上下文管理器
- TREY HUNNER
- • Shared by Trey Hunner
Objects with enter and exit methods can be used as context managers in Python. This article (and screencast) explains most of what you’ll want to know when creating your own context managers.
- PEP 723: 在单文件脚本中嵌入 pyproject.toml
- PYTHON.ORG
This PEP proposes a metadata format which a single-file script can use to specify dependency and tool information for IDEs and external development tools. It replaces PEP 722.
-
- PYPI.ORG
-
- PYTHON SOFTWARE FOUNDATION
-
- CPYTHON DEV BLOG
探讨/吐糟
Discussions
NULL
文章/教程/嗯哼
Articles, Tutorials and Talks
- Prompt Engineering: 一个实际例子
- REAL PYTHON
Learn prompt engineering techniques with a practical, real-world project to get better results from large language models. This tutorial covers zero-shot and few-shot prompting, delimiters, numbered steps, role prompts, chain-of-thought prompting, and more. Improve your LLM-assisted projects today.
(是也乎:
)
An extremely detailed, deep dive on how static type systems impact the consistency of languages. Hirrolot compares a variety of lesser known languages to see the consequences of their decisions. See also the associated Hacker News discussion.
(是也乎:
都是硬件的锅...
)
- Python的 list :深入探究示例
- REAL PYTHON
In this tutorial, you’ll dive deep into Python’s lists. You’ll learn how to create them, update their content, populate and grow them, and more. Along the way, you’ll code practical examples that will help you strengthen your skills with this fundamental data type in Python.
(是也乎:
)
- 排序算法完整比较
- CODERSLEGACY.COM
- • Shared by Raahim Siddiqi
An comprehensive comparison on the performance of 9 major Sorting Algorithms and how well they perform under varying circumstances. The aim of the article is to show you where each type of Algorithms shines, and where it does badly.
(是也乎:
其实排序算法远没有到达极限, 谁要提出一个有效的排序算法照样能得图灵奖.
)
- 支持 Python-Markdown 中的 Bootstrap-Alerts
- FLORIAN DAHLITZ
- • Shared by Florian Dahlitz
If you’re using Markdown on your blog, or any website, a conversion pipeline allows you to create your own rules and widgets. This article shows you how to integrate Bootstrap Alert boxes into a Markdown workflow.
- 简单的导入如何修改解释器
- KEN SCHUTTE
This article shows a sample module that swaps the values for 8 and 9, not something generally recommended. Learn how side effects from an import can impact your code and just what the integer object cache is.
- 优雅重要吗?
- MATHSPP.COM
- • Shared by Rodrigo Girão Serrão
In this article, the author explains why he thinks that elegance should be a fundamental driver when you are writing (Python) code, and gives a few tips on how to write elegant code.
(是也乎:
>>> import itertools
>>> list_of_lists = [[1, 2, 3], [4], [5, 6]]
>>> list(itertools.chain(*list_of_lists))
[1, 2, 3, 4, 5, 6]
官方的优雅是必须的...
)
- 为什么 Python 如此神奇
- JOS VISSER
This opinion piece by Jos is a counter to the “its a terrible language” posts you come across once and a while. Read why Jos thinks Python is amazing.
(是也乎:
简单的说, 你可以用很低的心智成本作出任何东西来...
)
- 从零开始搞 Llama
- BRIAN KITANO
This blog post provides step by step instructions on how to implement llama from scratch, using a dramatically scaled-down version for training.
- 对联合LLMs的对抗性攻击
- ZOU, WANG, KOLTER, & FREDRIKSON
Deep CS paper on how to abuse Large Language Models and work around restrictions where the model is refusing to answer.
- 2022年PSF年度报告
- PYTHON.ORG
The annual report from the Python Software Foundation details all the changes and events at the PSF last year.
(是也乎:
怪不得无感呢...
)
好物/妙品/...
Interesting Projects, Tools and Libraries, Projects & Code
- dpv: pyenv-virtualenv 和 virtualenvwrapper 的替代方案
- GITHUB.COM/CAIOARIEDE
- • Shared by Caio Ariede
(是也乎:
)
-
- GITHUB.COM/AVNIGO
-
- GITHUB.COM/BEEWARE
(是也乎:
BeeWare 的衍生工具...
)
-
django_simple_notification: REST 通知系统
- GITHUB.COM/MAHMOUDNASSER01
-
pyOCD: 适用于 Arm Cortex-M 微控制器的 Python
- GITHUB.COM/PYOCD
📆🐍 活动/大会
Events, MeetUp 真的是全球线下活动组织中心
-
Weekly Real Python Office Hours Q&A (Virtual)
- August 16, 2023
-
- August 17, 2023
-
- August 17, 2023
-
- August 18 to August 19, 2023
-
- August 18 to August 23, 2023
-
- August 18 to August 19, 2023
-
- August 24 to August 27, 2023
历史上这周
- 2022: 蠎周刊 PyCoder 538
- 2021: 蠎周刊 485
- 2020: 蠎周刊 432
- 2019: 蠎周刊 381
- 2018: 蠎周刊 330
- 2017: 蠎加载 137
- 2016: 蠎加载 86
- 2015: 蠎周刊 179
- 2014: Issue 128
- 2013: 空缺
- 2012: Issue 27: Stompy
DAMA
❤️ Happy Pythonic ;-(
大妈私人无责任播报
)
- 大妈的多重宇宙 - YouTube
- @Chaos42DAMA
- 恢复各种嗯哼...
- Zoom.Quiet’s Chaos42 | Substack
- 古早:新闻组式写作
- 欢迎订阅, 包含当前周刊
_~-+∽~_
() / ◵ ^ \ \/
'_ △ _'
> '--.--' |
...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/大妈
就是四处 是也乎,( ̄▽ ̄)
的那个大妈:
全职嗯哼: 大妈的多重宇宙 - https://www.youtube.com/@Chaos42DAMA
私自嗯哼: ZoomQuiet (订阅号: ZoomQuiet42)
公开社群: 蟒营 (订阅号: Mainium)
as 创始组织者:
CPyUG (mailling-list: python-cn@googlegroups.com)
PyChina (订阅号: PyChinaOrg)
本地社区:
GDG珠海 (订阅号: GDG-ZhuHai)
AIGC珠海
Comments