21 年 Django 开发者调查结果

原文: PyCoder's Weekly - Issue #506

pycoder

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

Here’s a Python gem: a small bit of Python that uses the power of the language and standard library well. It’s a function to list strings generated by a pattern with embedded alternatives. It takes an input string with brace-wrapped possibilities, and generates all the strings made from making choices among them: explode("{Alice,Bob} ate a {banana,donut}.")

(是也乎:

不是, 这项目名儿, 蹭 Ruby 的?

)

In this four-part tutorial series, you’ll build a social network with Django to showcase in your portfolio. You’ll learn about relationships between Django models and how to use forms so that users can interact with your app. You’ll also make your site look good by using the Bulma CSS framework.

(是也乎:

Django

这插图有点儿马虎了

)

A guide to Abstract Syntax Trees in Python. They form the basis of a lot of tools we take for granted, like linters, code formatters and syntax highlighting. With this article you’ll get to learn about ASTs by building your own linter from scratch.

(是也乎:

不是, ASTs 折腾明白了, 第一作品不应该是 DSL 嘛?

)

(是也乎:

开发者调查结果

还有很多反直觉结果...

)


探讨/吐糟

Discussions

In Python the % operator returns a number with the same sign as the second argument. C doesn’t actually have a “modulo” operator but a “remainder” operator, according to the C spec. Read the Hacker News discussion after the tweet for a full explanation.

“Unintended consequence of Mark Shannon’s change that refactors fast opcode dispatching […]”

(是也乎:

这么多年过去了, 为什么 灵魂追问, 总是发生在 SO 场景中?

)


文章/教程/嗯哼

Articles, Tutorials and Talks

Following the news on log4j lately, you may wonder if Python’s logging library is safe. After all, there is a potential for injection attacks where string formatting meets user input. Thankfully, Python’s logging isn’t vulnerable to remote code execution. Nonetheless it is still important to be careful with untrusted data. This article describes some common pitfalls, and how logging f-strings could—in certain situations—leave you vulnerable to other types of attacks.

(是也乎:

没被 logging 折腾过的程序猿不是好CTO

)

It’s been a year of change at Real Python! The Real Python team has written, edited, curated, illustrated, and produced a mountain of Python articles this year. We also added many new members to the team, updated the site’s features, and created new styles of tutorials and projects.

(是也乎:

MM

)

This post is not about importing typing.Optional, but instead imports that are themselves optional. Libraries often have optional dependencies, and the code should work whether or not the import is there.

(是也乎:

Hints

非常 O'REILLY 了.

)

When exceptions go unhandled, Python prints a traceback. Tracebacks are read from the bottom upward. The last line describes what happened and lines above describe where it happened.

(是也乎:

基操了, 当初还很认真的想理解每一行, 现在拉到最后看一眼就知道哪儿的问题了...

)

A discussion of three problems with Python: “packaging, fractured tooling, crufty standard library”

(是也乎:

其它语言有可能工具问题是太少, 在 Python 一向是可选择的的工具太多以致...没时间写代码了.

而基础问题又一直没解决好; 只能说历史遗留...

打包/破碎的工具/粗糙的标准库

)

(是也乎:

系列 逻辑 控制理解系列

以及... Unravelling decorators

)

(是也乎:

之前只说是发票工具 , 现在果断可以构造图书

)


好物/妙品/...

Interesting Projects, Tools and Libraries, Projects & Code

(是也乎:

嗯哼? Python 之光终于开始照耀 MAC iWork 了?

)

(是也乎:

NetworkX

老牌工具 Graphviz 基础上的绘制脚本, 可以支撑极大数量节点网络的绘制.

)

(是也乎:

压缩 Python 代码排版

minifier

这样不好不好

)

(是也乎:

上古神器/永无止境

)

(是也乎:

包含大量 C 代码..

)

(是也乎:

关键看浏览器了...

)


📆🐍 活动/大会

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


DAMA

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

(是也乎:

老司机开新坑, 时隔10年, 沈游侠再次开声, 值得关注:

Bilibili

)


PS:

PPS:

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

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

问为什么:

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

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


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

投稿/反馈邮箱:

askdama@googlegroups.com

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


ZoomQuiet/大妈

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

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

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


Comments



自怼圈/年度番新

DU22.4
关于 ~ DebugUself with DAMA ;-)
点击注册~> 获得 100$ 体验券: DigitalOcean Referral Badge

订阅 substack 体验古早写作:


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


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

**2021.01.11** 因大妈再次创业暂停定期开设, 转换为预约触发:

追问

任何问题, 随时邮件提问可也:
askdama@googlegroups.com

-->