[C++-sig] c + python interchangable?

Jason Kankiewicz jkankiewicz at advpubtech.com
Tue Jul 5 20:35:25 CEST 2005

They're interchangeable in a sense because Python is implemented in C 
and therefore any Python program must have an equivalent C 
implementation. They're not interchangeable in a sense because Python is 
an interpreted, dynamically-typed, garbage-collected language and not a 
compiled, statically-typed, non-garbage-collected language like C.

Python complements C by addressing its weaknesses. Python's greatest 
weakness is speed but this can be addressed by re-coding the slowest 
parts of a Python program in C (or C++ using Boost.Python or SWIG) as an 
extension module. This "hybrid programming" approach should take much 
less work and yield similar results to re-coding an entire Python 
program in C.

danny280279 at netscape.net wrote:
> hi all i know that c and python are closely interchangable, so I was wondering if there are any docs that could help me change python code over to c code.
> __________________________________________________________________
> Switch to Netscape Internet Service.
> As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register
> Netscape. Just the Net You Need.
> New! Netscape Toolbar for Internet Explorer
> Search from anywhere on the Web and block those annoying pop-ups.
> Download now at http://channels.netscape.com/ns/search/install.jsp

More information about the Cplusplus-sig mailing list