Another Python rookie trying to port to C/C++ question.

Peter Otten __peter__ at web.de
Thu Sep 25 16:52:53 EDT 2003


Don Bruder wrote:

> A week or two ago, I asked here about porting Python to C. Got some good
> answers (Note 1) but now I've got another question. Actually, more a
> request for clarification of a topic that both the Python tutorial and
> docs leave a touch murky to my understanding.
> 
> Dictionaries/"dict" types...

As you seem to feel at home with C, you could have a look into
Objects/dictobject.c and Include/dictobject.h of the source distribution.

> Which part of "I don't care how good, bad, or indifferent Python is
> compared to C/C++, or any other language. I want this Python code to be
> written in C/C++, end of discussion." wasn't clear enough for those of

Smart people use efficient tools and build on existing libraries. If you are
serious about the C++ part of your subject line, the Standard library aka
STL has a map template that resembles Python's dict and might enhance both
development and execution speed.

Off topic (or not):
A single person can start a discussion but not limit it, I think that's a
feature of newsgroups rather than an annoyance.


Peter





More information about the Python-list mailing list