-
Notifications
You must be signed in to change notification settings - Fork 0
/
keywords.py
44 lines (44 loc) · 1012 Bytes
/
keywords.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
py_to_s_keywords = {
"False": "Falso",
"None": "Ninguno",
"True": "Verdad",
"and": "y",
"as": "como",
"assert": "afirma",
"async": "asinc",
"await": "espera",
"break": "rompe",
"class": "clase",
"continue": "continua",
"def": "def",
"del": "borra",
"elif": "sinosi",
"else:": "sino:",
"except": "excepto",
"finally": "final",
"for": "por",
"from": "de",
"global": "global",
"if": "si",
"import": "importa",
"in": "en",
"is": "es",
"lambda": "lambda",
"nonlocal": "no local",
"not": "no",
"or": "o",
"pass": "pasa",
"raise": "eleva",
"return": "devuelve",
"try:": "intenta:",
"while": "mientras",
"with": "con",
"yield": "produce",
"input": "introducir",
"print": "imprimir"
}
# excepto could be iffy
# nonlocal is makey uppy
# deal with else, elif, and not
# raise: keep as raise or throw?
s_to_py_keywords = {val: key for key, val in py_to_s_keywords.items()}