piglei / one-python-craftsman

来自一位 Pythonista 的编程经验分享,内容涵盖编码技巧、最佳实践与思维模式等方面。

Home Page:https://www.piglei.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

现已支持switch case

A100512B opened this issue · comments

在python 3.10中已经支持switch case,但是他在python里叫match case。
使用 case _相当于Java中switch中的default子句

感谢提醒,我确实也读过一些 Structural Pattern Matching 的相关介绍。

但在我目前正在进行的重写计划里,选用的主版本是 Python 3.8,所以暂时不会涉及到 Structural Pattern Matching。如果后续有变化,我会在这告诉你。