summaryrefslogtreecommitdiff
path: root/modules/language/python/module/keyword.scm
diff options
context:
space:
mode:
authorStefan Israelsson Tampe <stefan.itampe@gmail.com>2018-03-21 14:20:35 +0100
committerStefan Israelsson Tampe <stefan.itampe@gmail.com>2018-03-21 14:20:35 +0100
commit083cdb005f11b69ce5642960e724ddf281f41032 (patch)
tree80e1020468920b3a6b20ab83f29c0f594b9d0ccc /modules/language/python/module/keyword.scm
parent16e97e4e005ebd1d3270d8c84f8e04667a8733ed (diff)
collections finished and compiles
Diffstat (limited to 'modules/language/python/module/keyword.scm')
-rw-r--r--modules/language/python/module/keyword.scm46
1 files changed, 46 insertions, 0 deletions
diff --git a/modules/language/python/module/keyword.scm b/modules/language/python/module/keyword.scm
new file mode 100644
index 0000000..c749ff5
--- /dev/null
+++ b/modules/language/python/module/keyword.scm
@@ -0,0 +1,46 @@
+(define-module (language python module keyword)
+ #:use-module (language python string)
+ #:use-module (language python set)
+ #:use-module (oop pf-objects)
+
+ #:export (kwlist iskeyword))
+
+(define kwlist
+ '("False"
+ "None"
+ "True"
+ "and"
+ "as"
+ "assert"
+ "break"
+ "class"
+ "continue"
+ "def"
+ "del"
+ "elif"
+ "else"
+ "except"
+ "finally"
+ "for"
+ "from"
+ "global"
+ "if"
+ "import"
+ "in"
+ "is"
+ "lambda"
+ "nonlocal"
+ "not"
+ "or"
+ "pass"
+ "raise"
+ "return"
+ "try"
+ "while"
+ "with"
+ "yield"))
+
+
+(define iskeyword (ref (py-set kwlist) '__contains__))
+
+