PEP 695:类型参数语法/草案

原文: PyCoder's Weekly - Issue #535

pycoder

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

Create your own flashcards app to help you to learn a new language. In this step-by-step project, you’ll replicate a spaced repetition system with the Django web framework. If you want to learn a new topic while sharpening your Django and Python skills, this tutorial is the perfect match for you!

(是也乎:

Flashcards

嗯哼? 实体结合, 这很适合私人软件发售形式哪...

)

When building a command line program that authenticates to a service, you may not want the user to have to enter their password every single time. This article shows you how to manage authentication tokens to make you user’s life easier. The Twitter API is used as the example data source.

(是也乎:

嗯哼? 这样安全嘛?

)

It’s time to say goodbye to os.path, random, pytz, namedtuple and many more obsolete Python libraries. Start using the latest and greatest ones instead.

(是也乎:

如此决然的嘛?

)

This Python Enhancement Proposals (PEP) draft describes an improved syntax for specifying type parameters within a generic class, function, or type alias. For example: class ClassA[T: str]: It also introduces a new statement for declaring type aliases.


探讨/吐糟

Discussions

(是也乎:

永远值得的... 即便无法形成私人品牌, 一个独立的发布渠道是每个公民应该的出口

)


文章/教程/嗯哼

Articles, Tutorials and Talks

In this tutorial you will learn the difference between map() and submit() when executing tasks with the ProcessPoolExecutor in Python. You’ll see how to use map() to convert a for-loop into processes and when to replace it with submit() to gain more control.

Once Guido gave up his title of Benevolent Dictator for Life, a five-person team became responsible for steering the development of Python. Improvements are rarely straightforward, changes that help some may hurt others.

The prettymaps project allows you to create an aesthetically pleasing map image from real data. It does this in only 425 lines of Python through the use of 3rd party packages. Learn how to use it and how it works.

(是也乎: 之前曰过...

)

Type annotations help catch errors in your code. Their correct usage can even stop malicious use of your scripts. Learn how the Literal type can prevent users from sending values that could break your code.

(是也乎:

类型安全这事儿, 从来不是一个环节就能彻底解决的, 得, 从定义/传参/发送/接收/解析/...全生命周期来看管..

不过, 也可以简单点儿, 出问题再补就好

)

In this course, you’ll learn how Python’s not operator works and how to use it in your code. You’ll get to know its features and see what kind of programming problems you can solve by using not in Python.

(是也乎:

Operator

)

“The way we write about and around code is arguably as important as the code itself.” This article outlines how programming and writing come together to take your developer skills to the next level.

(是也乎:

Writing

是的, 不想当作家的程序猿不是好厨师

)

Hired has 1000s of companies ranging from startups to Fortune 500s that are actively hiring developers, data scientists, mobile engineers, and more. Create a profile with your skills and preferences for hiring managers to reach you. Sign up today!

In this tutorial, you’ll learn how to create custom dictionary-like classes in Python by inheriting from the built-in dict class or by subclassing UserDict from the collections module.

(是也乎:

UserDict

)

Thinking of picking up another programming language? This quick list shows you what is similar and what is different between Ruby and Python.

(是也乎:

嗯哼? 反潮流哪...

)


好物/妙品/...

Interesting Projects, Tools and Libraries, Projects & Code

(是也乎:

叕一个再包装 时间计算 的包, 文档比较马虎, 就看后期增补了

)

(是也乎:

这等于是将服务端的空间拿来换本地空间?

)

(是也乎:

import math math.sqrt(8) 2.82842712475

import sympy sympy.sqrt(8) 2*sqrt(2)

嗯哼...

)

(是也乎:

Profiling

既然 Py 委员会开始大张旗鼓的提高运行效率, 那么效能测试器也必然是热点了...

)


📆🐍 活动/大会

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


DAMA

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

ACM-O

(是也乎:

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

)


PS:

PPS:

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

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

问为什么:

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

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


好文笔,感叹号年度配额: 1/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
-->