Skip to content

Commit 866f47f

Browse files
author
_
committed
use full list of special names
1 parent 9df7222 commit 866f47f

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

pfa.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,13 @@ static int isoptype(char c) {
185185
return 0;
186186
}
187187

188-
static const char *specnames[] = {"if", "then", "else", "import", "except",
189-
"for", "while", "return", "yield", "from",
190-
"as", "else", "finally", NULL};
188+
/* import keyword; print(*keyword.kwlist) */
189+
static const char *specnames[] = {
190+
"and", "as", "assert", "break", "class", "continue", "def",
191+
"del", "elif", "else", "except", "finally", "for", "from",
192+
"global", "if", "import", "in", "is", "lambda", "nonlocal",
193+
"not", "or", "pass", "raise", "return", "try", "while",
194+
"with", "yield", NULL};
191195

192196
static void pyformat(FILE *file, FILE *out, struct vlbuf *origfile,
193197
struct vlbuf *formfile) {

0 commit comments

Comments
 (0)