Functions implemented in pure Python