icon: dot title: Comparison with CPython
cpython is the reference implementation of the Python programming language. It is written in C and is the most widely used implementation of Python.
pkpy aims to be an alternative to lua for game scripting, not cpython for general purpose programming.
pkpy supports most of the syntax and semantics of python. For performance and simplicity, some features are not implemented, or behave differently. The easiest way to test a feature is to try it on your browser.
__getattr__ and __setattr__.__get__ and __set__. However, @property is implemented.__slots__ in class definition.else clause in try..except.__iadd__ and __imul__.__del__ in class definition.StopIteration is returned instead of raised.++i and --j is an increment/decrement statement, not an expression.int does not derive from bool.int is 64-bit. You can use long type explicitly for arbitrary sized integers.__ne__ is not required. Define __eq__ is enough.a, b, *c = x, the starred variable can only be presented in the last position. a, *b, c = x is not supported.Tab is equivalent to 4 spaces. You can mix Tab and spaces in indentation, but it is not recommended.%, &, //, ^ and | for int behave the same as C, not python.