"in" for dicts (was: Python 2.1 function attributes)

Quinn Dunkan quinn at hork.ugcs.caltech.edu
Fri Feb 2 13:53:24 EST 2001


On Fri, 02 Feb 2001 02:43:13 -0800, Nathaniel Gray
<n8gray at caltech.edu.is.my.e-mail.address> wrote:
>No can do.  The only reason I'm able to play with Python at all right
>now is because 1.52 comes preinstalled on RH.  I'm doing a one-term
>rotation with a research group where I'm the only one who's even _heard_
>of Python.  It's a bit of a "don't ask, don't tell" kind of situation.
>
>Big bummer:  when the end of the term comes I'll have to port all my
>code to C.  I can already feel my productivity slipping away...
>
>Anybody know of a good C implementation of dictionaries?  (Other than
>Python's, that is :^)

Well, two ideas:

Say "I use this C library called libpython.a that provides some basic
facilities.  Oh, and I also use a special notation to call libpython.a
procedures called 'python'---you should be able to learn the special notation
quicker than the C library interface.  But if you really want to learn the C
interface, the special notation can be converted with a utility called
'Python2C'".

Or:

Port your code to eiffel.  It's not quite python, but it should be an easier
port than to C.  Then use SmallEiffel to compile your eiffel to C.  Ok, so it
won't be the prettiest C in the world, but hey, it's C and that's what they
want, right?  Roll that baby through 'indent' and you're set!

;)



More information about the Python-list mailing list