Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Keywords = map[string]bool{ "False": true, "None": true, "True": true, "and": true, "as": true, "assert": true, "async": true, "await": true, "break": true, "class": true, "continue": true, "def": true, "del": true, "elif": true, "else": true, "except": true, "exec": true, "finally": true, "for": true, "from": true, "global": true, "if": true, "import": true, "in": true, "is": true, "lambda": true, "nonlocal": true, "not": true, "or": true, "pass": true, "print": true, "raise": true, "return": true, "try": true, "while": true, "with": true, "yield": true, }
Keywords is a map of reserved keywords used by Python 2 and 3. We use this to avoid generating unspeakable names in the resulting code. This map was sourced by merging the following reference material:
Functions ¶
func EnsureKeywordSafe ¶
EnsureKeywordSafe adds a trailing underscore if the generated name clashes with a Python 2 or 3 keyword, per PEP 8: https://www.python.org/dev/peps/pep-0008/?#function-and-method-arguments
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.