For this reason the original implementation of Python was written with the understanding that it was perfectly sensible to use the same single execution stack that C used - after all Python was written in C. Despite being on version 2.7/3.3 nowadays, the standard Python is still written in C, still uses a single execution stack design and is often known as CPython.
|English: CPU Zilog Z8 (Photo credit: Wikipedia)|
|AMD Athlon™ X2 Dual-Core Processor 6400+ in AM2 package (Photo credit: Wikipedia)|
This is a bit of a pain for CPython because it only knows how to use a single stack, i.e. a single core, and that is just a bit of a waste of those other cores which are just itching to make it all run super fast.
So Stackless Python is essentially a redesign of CPython which avoids using the call stack and instead uses something called microthreads to get around the problem. This means four things to you:
- Concurrent programming is possible.
- Concurrency can improve on execution time if done properly.
- You need to learn some new concepts: tasklets and channels.
- You get to use some new stuff: tasklets and channels.
There's a very informative interview with the creator of Stackless Python here.
You may like to be ready by reading my post about installing Stackless Python.
Good luck fellow travellers.