为什么类型提示很烂… 原文: PyCoder’s Weekly - Issue #565 pycoder

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


探讨/吐糟

Discussions

  • 为什么类型提示很烂!
    • REDDIT (是也乎: 可以说, 这是步向伟大的阵痛嘛? 作者列出了9种经典企图, 都失败了… PS: 反正俺没开始用… )

文章/教程/嗯哼

Articles, Tutorials and Talks

  • 对 PyPI 用户的最新攻击, 骗子越来越厉害
    • DAN GOODIN Over 400 new malicious packages have been uploaded to PyPI that use a malicious JavaScript extension to monitor infected machines for crypto-currency interactions with the intent of stealing credentials. Packages are named based on typos of many of the most popular PyPI downloads. (是也乎: 毕竟 PyPI 的用户比其它应用现场要多的多, 而且多数是自动部署,没有人关注…简直就是天然的后门池… )
  • PySport 开源
    • PYSPORT.ORG This site is a collection of open source Python and R tools for sports analytics, including scrapers and API wrappers for a variety for sites, data plotting, and analysis. It is maintained by PySport. (是也乎: 运动数据学? 好象几部相关电影上映后, 对体育竞技进行大数据监理就变成了热门职业… )
  • Python 中的 getter 和 setter
    • REAL PYTHON
    • COURSE In this video course, you’ll learn what getter and setter methods are, how Python properties are preferred over getters and setters when dealing with attribute access and mutation, and when to use getter and setter methods instead of properties in Python. (是也乎: Setters )
  • Python Basics: 使用类构建系统
    • REAL PYTHON
    • COURSE In this video course, you’ll learn how to work with classes to build complex systems in Python. By composing classes, inheriting from other classes, and overriding class behavior, you’ll harness the power of object-oriented programming (OOP). (是也乎: COURSE 当然也可以不用… )
  • 基本 Django 部署指南
    • SAAS PEGASUS Going from “it works on my machine” to deploying to the public can be a daunting task. This guide details the choices between VPS and PaaS systems, how to choose, what the options are, and what you need to know to get your Django code live.
  • 图像大小调整背后的危险
    • ZURU.TECH When training an ML model on image data you likely want smaller, consistently sized images. That means image processing in your pipeline, but the expectation that image resizing is the same across libraries can cause unforeseen problems.
  • 你应该写一个没有 @dataclass 的类吗?
    • GLYPH LEFKOWITZ This article makes the argument that you should always use @dataclass for building classes in Python. Read on to understand why, and maybe respond to Glyph’s call-to-action to tell him if you think he’s wrong.
  • 在 Python 中缓存大量方法
    • ADRIAN This article goes deep on functools.lru_cache() including all the arguments against using it, and how to argue with the arguments. Learn how to cache the results of your functions with a single line of code.
  • Google OSS 项目 Python 风格指南
    • GOOGLE This is the style guide for any Google-originated open-source projects and a conversation on Hacker News about its content. (是也乎: Style 暂时还没有 Rust 风格指南, 不过, Python 这版比当年推出时, 复杂了3倍… 怪不得 Guido 老爹当年都要学习几周才能通过自动化风格检查器。。。 )

好物/妙品/

Interesting Projects, Tools and Libraries, Projects & Code


📆🐍 活动/大会

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


DAMA

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


PS

Happy Pythoning!

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

PPS

不觉中蟒周刊快译已经到了第11个年头 开始有小伙伴加入承担 pythonisa 周刊的翻译, 从来没提醒过, 可就这么默默坚持下来了… 问为什么: [皱眉]每周新闻资讯 怎么能错过 看看有什么新东西 当有新的发现时: what f**k 还能这样玩? 还有这东西? 每周开彩蛋[吃瓜] 无法同意更多… 很多社区贡献看起来辛苦, 其实受益最多的, 就是主动承担者也.


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

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

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