Python Written in C?

mk mrkafk at gmail.com
Mon Jul 21 12:12:54 EDT 2008


> Who cares what language a language is written in as long as you can be
> productive - which you certainly can be in Python.

Seriously, though, would there be any advantage in re-implementing 
Python in e.g. C++?

Not that current implementation is bad, anything but, but if you're not 
careful, the fact that lists are implemented as C arrays can bite your 
rear from time to time (it recently bit mine while using lxml). Suppose 
C++ re-implementation used some other data structure (like linked list, 
possibly with twists like having an array containing pointers to 1st 
linked list elements to speed lookups up), which would be a bit slower 
on average perhaps, but it would behave better re deletion?





More information about the Python-list mailing list