Message47782
Logged In: YES
user_id=4771
On a side note, maybe it makes sense for a new module like this one to promote and use the modern (>=2.2) ways of defining C types.
What I have in mind is using tp_methods instead of Py_FindMethod, and generally not reverting to strcmp(). In this case, the constants like 'digest_size' would be best stored as class attributes instead, if possible. Indeed, allowing expressions like "hashlib.md5.digest_size" conveys the idea that the result doesn't depend on a particular instance, unlike "hashlib.md5().digest_size". (Of course class attributes are also readable from the instance, as usual.)
I can give it a try if you don't want to invest more time in this patch than you already did (for which we are grateful to you :-) |
|
Date |
User |
Action |
Args |
2007-08-23 15:41:50 | admin | link | issue1121611 messages |
2007-08-23 15:41:50 | admin | create | |
|