OS X crashes "No memory", but much of it free
Have a look in the Console log. You will likely see that it's a Python-internal issue. Most likely a recursion or some exhaustive memory allocation. Python and other languages use a limited stack/heap to store runtime data (like the call stack). If that is exhausted they simply croak and do not ask the OSX to provide more memory.