- 主题:Python3.10为了match/case搞出个soft keyword的概念
看到3.10版出了个match/case的语法糖就觉得奇怪
re.match用了无数次了,这个match怎么能跟if while同等地位,当做保留关键词呢
结果造了一个soft keyword的概念,有点无语
2.3.2. Soft Keywords?
New in version 3.10.
Some identifiers are only reserved under specific contexts. These are known as soft keywords. The identifiers match, case and _ can syntactically act as keywords in contexts related to the pattern matching statement, but this distinction is done at the parser level, not when tokenizing.
As soft keywords, their use with pattern matching is possible while still preserving compatibility with existing code that uses match, case and _ as identifier names.
--
FROM 114.245.100.*
能兼容就好
--
FROM 119.248.227.*
keyword本来就不等于reserved word。
【 在 SaveTheQueen 的大作中提到: 】
: 看到3.10版出了个match/case的语法糖就觉得奇怪
: re.match用了无数次了,这个match怎么能跟if while同等地位,当做保留关键词呢
: 结果造了一个soft keyword的概念,有点无语
: ...................
--
FROM 114.86.93.*
超级垃圾语法!
python 快变 perl 了。
【 在 SaveTheQueen (STQ) 的大作中提到: 】
: 看到3.10版出了个match/case的语法糖就觉得奇怪
: re.match用了无数次了,这个match怎么能跟if while同等地位,当做保留关键词呢
: 结果造了一个soft keyword的概念,有点无语
: ...................
--
FROM 124.72.119.*
看了一下 perl 版几乎没人了
N年前简单用过Perl4,好久不关注了,也不知道 Larry Wall 搞得 perl 到几代了
就知道当年Perl社区有个华人牛人 唐凤,不知道现在如何了
【 在 hgoldfish (老鱼) 的大作中提到: 】
: 超级垃圾语法!
: python 快变 perl 了。
--
修改:Spirituel FROM 111.36.206.*
FROM 111.36.206.*
就知道出了个LGBT
【 在 Spirituel 的大作中提到: 】
: 看了一下 perl 版几乎没人了
: N年前简单用过Perl4,好久不关注了,也不知道 Larry Wall 搞得 perl 到几代了
: 就知道当年Perl社区有个华人牛人 唐凤,不知道现在如何了
: ...................
--
FROM 119.248.227.*
之前有人说北京会perl不到100人了。。
【 在 Spirituel (魂灵之眼~ffhh) 的大作中提到: 】
: 看了一下 perl 版几乎没人了
: N年前简单用过Perl4,好久不关注了,也不知道 Larry Wall 搞得 perl 到几代了
: 就知道当年Perl社区有个华人牛人 唐凤,不知道现在如何了
: ...................
--
FROM 223.104.97.*
今天我还写了100多行perl,现在写这代码全靠蒙。
【 在 Spirituel 的大作中提到: 】
: 看了一下 perl 版几乎没人了
:
: N年前简单用过Perl4,好久不关注了,也不知道 Larry Wall 搞得 perl 到几代了
:
: 就知道当年Perl社区有个华人牛人 唐凤,不知道现在如何了
发自「今日水木 on LYA-AL00」
--
FROM 121.236.115.*
啥叫“会”?
【 在 lokta (部落) 的大作中提到: 】
: 之前有人说北京会perl不到100人了。。
--
FROM 111.163.120.*