PythonLanguage
classin packageklyn.code.python
public class PythonLanguage extends Object
└ PythonLanguage

Canonical LanguageProfile factory and vocabulary definitions for Python (.py, .pyw, .pyi).

Includes Python 3.12 keywords (match, case, type, async, await, nonlocal), built-in types and functions, f/r/b/u string prefixes, and triple-quoted strings.

import klyn.code.python

profile = PythonLanguage.profile()
assert profile.id == "python"
assert profile.isKeyword("def")
assert profile.isConstant("None")
Inherited Properties
propertyInherited Properties from Object: type
Methods
Modifier and Type Member Description
public static profile
profile() as LanguageProfile
Returns the shared singleton LanguageProfile for Python.
Inherited Methods
methodInherited Methods from Object: deepCopy, fromJson, hash, toDict, toJson, toMap, toString, toXml