Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #72274
| References | <1401398515.60590.YahooMailNeo@web140106.mail.bf1.yahoo.com> |
|---|---|
| Date | 2014-05-30 12:44 +1000 |
| Subject | Re: Proposal of an API to deal with fingerprints on Python |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.10472.1401417876.18130.python-list@python.org> (permalink) |
On Fri, May 30, 2014 at 7:21 AM, Pedro Izecksohn <izecksohn@yahoo.com.dmarc.invalid> wrote: > Today I wrote the following API. It was not implemented on C yet. Do you have any comment? Could you help me to implement it? > > http://www.izecksohn.com/pedro/python/fingerprint/fingerprint.001.py If that's a proof-of-concept for just the function names and things, then what I'd say is: Follow PEP 8, especially if (as your license comment suggests) you're hoping for it to be included in the Python standard library. Notably, use underscore_separated_names rather than mixedCase for function names. If that's meant to be actual usable (if stubby) code, then PEP 8 is even more important; for instance, "if (None == fpdev):" should be "if fpdev is None:". Also, your bare excepts are nasty code smell. My recommendation: Look into Cython. You're basically wrapping a C library, so you should be able to let Cython do the heavy lifting, and then maybe just add a few convenience functions in pure Python. There won't be much work, that way! Regarding licensing, by the way, I would advise decoupling yourself from the CPython standard library, which has a bit of a mess of licensing and ownership due to its long history. Pick one of the well-known open source licenses, like MIT, GPL2/GPL3, or MPL, and use that. Post your code on some place like github or bitbucket, link to it from PyPI, and let your project stand alone as a third-party installable package - if it's good, people will use it, and they can find it using pip or equivalent. ChrisA
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Proposal of an API to deal with fingerprints on Python Chris Angelico <rosuav@gmail.com> - 2014-05-30 12:44 +1000
csiph-web