PyScript 直接在浏览器中运行 Py

原文: PyCoder's Weekly - Issue #524


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

“It was wonderful to be back at PyCon US in person again. PyCon is way too big for any one person’s summary to tell the whole story, but I’m happy to share some of my personal highlights from this year’s event.”



大图...No1gdoQ.jpg (1500×2000)

怪不得老爹一直点赞 这个活动...


In this tutorial, you’ll explore several Python game engines available to you. For each, you’ll code simple examples and a more advanced game to learn the game engine’s strengths and weaknesses.


Engines )

Ultimate Guide to Python Pickle: How To’s, Exploits & Safety Python’s pickle library is useful in maintaining persistence within complex data structures and objects. Learn how to safely use a pickle in application development using this comprehensive guide → SNYK.IOSPONSOR

PyScript was announced at PyCon US 2022, it is a web-based application allowing you to use both Python and HTML to create applications. Discover what it can do and how it was built.



刷屏的大新闻, CoffeeScript 真正的目的, 现在实现了...


In April 2022, the PyCon US conference happened in Salt Lake City. During the conference, Python developers met for the annual Language Summit, and Anaconda announced PyScript, a way to write Python directly inside HTML. In this article, you’ll learn more about what happened in the last month in the world of Python.


News )



There’s nothing like talking about Python and speed to stir up a conversation. Join this discussion about Jake Edge’s Modern Python performance considerations.


Modern Python performance considerations []

好文章都在 中... 毕竟这是上古讨论中心...



Articles, Tutorials and Talks

In this video course, you’ll learn how to take your testing to the next level with pytest. You’ll cover intermediate and advanced pytest features such as fixtures, marks, parameters, and plugins. With pytest, you can make your test suites fast, effective, and less painful to maintain.



其实最关键的是编写代码时, 就设计好测试方案, 以免事后绕...


Cinder is an open-sourced fork of CPython that includes optimizations like immortal objects, inline caching, Static Python, Strict Modules, and a Just-In-Time compiler. This article does a deep dive on how their JIT handles function in-lining for performance gains.

Anaconda Nucleus is our education and community engagement platform. The platform features a wealth of data science content ranging from articles to webinars to videos and more. Join Our Free Online Community With Anaconda Nucleus

Visualizing data with a spectrogram helps reveal hidden insights in the audio data that may have been less apparent in the traditional waveform representations. With some numpy, matplotlib and scipy you can visualize your audio in a few short lines.

This PEP proposes the ability to defer the execution of imported modules until the moment when an imported object is used. Lazy imports can greatly reduce the overall number of modules initially loaded, improving startup time and memory usage.


PEP 绝对是 Python 发展核动力中心


Google Analytics can provide a lot of insight into your website’s traffic and although they have dashboard tools, you may want to dive deeper. Using the Google Analytics API you can retrieve your analytics data and be in full control.

Python’s match statement, which provides a C-like switch statement (though it is far more than that) was introduced in Python 3.10. Learn the history of the feature, how it is used, and how it works.


    for number in range(100):
        match number % 5, number % 3:
            case _, 0: print("Spam!")
            case 0, _: print("Eggs?")
            case 0, 0: print("Spam and eggs.")
            case _, _: print(number)

终于可以在 Python 中写 Lisp/Elixir/Clojure/... 了


WASM is great, who doesn’t want Python in the browser, but it often requires an expensive cold load of a page. Read more about how to minimize your WASM downloads for speedier Python in the web.

Learn how and and or are processed in your code, how Boolean short-circuiting works, how “truthy” values effect this, and how all this is handled in the all() and any() functions.

Alan describes his experience porting his Python library August to Rust. He outlines the resulting performance difference and things he learned along the way.


不会也比自动从 Py 翻译为 C 代码复杂? 所以, 我们可以安心继续写 Py 了, 性能着急时, 一键生成 C/Go/Rust 代码, 编译运行一下, 看哪个性能足够就用哪个; 嗯哼? 等等, 可以先用 PyPy 跑一下, 一般性能就足够了...


Learn the different ways of chaining calls in the Django ORM, how sometimes it results in duplicate objects, and what to do about it.


Django 本质上已经开始将自己作为一门 Python 的方言 在积累了...



Interesting Projects, Tools and Libraries, Projects & Code


Wow 风格化必要工具




是的, 积累30多年, PEPs 也变成类似 RFC 1 - Host Software 领域思考大集锦, 其实, 作为 Pythonic , 一生能通过 PEP 给 Python 注入一个新特性, 可算得一果位也;




神奇人物创造新神经模式, 其它聪明人快速使用, 给出案例; 普通人就只能点赞了




程序猿的 VI 设计就是这么朴素


📆🐍 活动/大会

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


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



谈崩了, 之前通过 ACM 会员可以每年 $25 享受 O'REILLY 在线图书馆服务...现在没了





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


[皱眉]每周新闻资讯 怎么能错过 
    what f**k 还能这样玩? 还有这东西?

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

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


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


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

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

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



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

订阅 substack 体验古早写作:

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


**2021.01.11** 因大妈再次创业暂停定期开设, 转换为预约触发:
  • + 扫描预约入群, 学员每满 42 人即启动新一期训练营 ;-)
  • 101camp22.7
  • + 任何问题, 随时邮件提问可也: