4 ms·
Pickle is a stack machine (https://en.wikipedia.org/wiki/Stack_machine https://en.wikipedia.org/wiki/Stack_machine). It is Turing complete. See source code and
by bugmen0t 6y ago
Pickle is a stack machine (https://en.wikipedia.org/wiki/Stack_machine https://en.wikipedia.org/wiki/Stack_machine). It is Turing complete.
See source code and documentation at https://github.com/python/cpython/blob/master/Lib/pickle.py#L107and https://github.com/python/cpython/blob/master/Lib/pickle.py#... https://github.com/python/cpython/blob/master/Lib/pickletools.py#L38 https://github.com/python/cpython/blob/master/Lib/pickletool...
N.B: "Turing complete" really means a lot less than you seem to believe.
- Dylan16807 6y agoA machine that has a stack and runs a series of instructions in sequence, no looping or branching, is a pushdown automaton. That's significantly weaker than Turing complete. (A pushdown automaton can do branching if it wants, but the lack of looping / going left is critical.)