关键字

原文:

Go

​ Go目前有25个关键字。

​ 来源:https://go.dev/ref/spec#Keywords

1
2
3
4
5
break        default      func         interface    select
case         defer        go           map          struct
chan         else         goto         package      switch
const        fallthrough  if           range        type
continue     for          import       return       var

Python

​ Python目前有35个关键字

​ 来源:https://docs.python.org/zh-cn/3.12/reference/lexical_analysis.html#keywords

1
2
3
4
5
6
7
False      await        else       import     pass
None      break         except     in         raise
True       class           finally    is         return
and         continue   for        lambda     try
as            def        from       nonlocal   while
assert    del        global     not        with
async     elif       if         or         yield

Java

Rust

JavaScript

TypeScript

Dart

C#

PHP

C

C++

最后修改 March 16, 2024: 更新 (4b0462d)