4

官方的 mypy 到现在还没支持 3.10 新特性吗?现在版本是 0.92, 一更新后所有的 match...

 2 years ago
source link: https://www.v2ex.com/t/823114
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  Python

官方的 mypy 到现在还没支持 3.10 新特性吗?现在版本是 0.92, 一更新后所有的 match 就报错了

  ChrisFreeMan · 17 小时 29 分钟前 · 710 次点击
9 条回复    2021-12-19 22:11:31 +08:00

abersheeran

abersheeran      15 小时 33 分钟前

mypy 对我来说,只剩下编译功能了,零成本提高 30% 左右的性能还是挺香的。真类型检查还得是 pylance/pyright 。

cmdOptionKana

cmdOptionKana      14 小时 38 分钟前

pylance 用 basic 比较舒服。

ChrisFreeMan

ChrisFreeMan      14 小时 9 分钟前 via iPhone

@abersheeran 啊🤔居然有编译提升性能的功能吗?我一直作为类型检查工具配合我的编辑器环境来使用的。我扫了下文档没找到啊

ChrisFreeMan

ChrisFreeMan      10 小时 34 分钟前

@cmdOptionKana 比较保守,看了下 python 官方自己有,而且 star 高,就用这个了

abersheeran

abersheeran      8 小时 28 分钟前

@ChrisFreeMan 我不是别的意思啊,Guido 懂个屁的类型系统,mypy 至今不支持递归类型,连个 Jsonable Type 都描述不了,以及 SelfType 被多次驳回。真要用静态类型的脚本语言,还是试试 TypeScript 吧。

abersheeran

abersheeran      8 小时 27 分钟前

总之我的意思是,pyright/pylance 要比 MyPy 好。

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK