[pypy-dev] module writing
mcneil at astro.queensu.ca
Thu Dec 9 00:24:18 CET 2004
Per Laura's suggestion I figured I'd try to look at some of the pending
unpythoned C modules.. though Florian beat me to binascii.py, darn it!
Should I follow Christian's suggestion and avoid generators in this stuff?
Before I remembered that binascii was already in the works I toyed with
reimplementing it, and half the functions use the same 8-to-6-to-8 bit
transforms with consequent code duplication. Can still be refactored
without generators, but is prettier with..
So I moved down the list to cryptmodule (now that md5 and sha are done).
There's actually an already-existing python implementation (fcrypt) by
Carey Evans based on Eric Young's C but buried in Young's license is an
advertising clause, and I hate those.. might be simpler to take an
unencumbered des routine from netbsd or the lgpl one in glibc and
Anyway, in the meantime, unless someone's secretly working on it I'll have
a look at structmodule. One issue's already come up: I can borrow
sys.byteorder, but determining the alignment padding for native C structs
is done in CPython at compiletime in structmodule.c using sizeof. I'll
raise a NotImplementedError and leave it for my betters.
Queen's University Astronomy Research Group
Planetary Dynamics Division "We create worlds."
More information about the Pypy-dev