Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #72274
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'third- party': 0.04; 'yet.': 0.04; 'api.': 0.05; 'cpython': 0.05; 'subject:Python': 0.06; 'nasty': 0.07; '"if': 0.09; 'mess': 0.09; 'pep': 0.09; 'things,': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'wrote': 0.14; 'bitbucket,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'licenses,': 0.16; 'mit,': 0.16; 'subject:API': 0.16; 'url:py': 0.16; 'usable': 0.16; 'well-known': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'basically': 0.19; 'ownership': 0.19; 'meant': 0.20; 'work,': 0.20; 'code,': 0.22; 'cc:addr:python.org': 0.22; 'instance,': 0.24; 'library,': 0.24; 'cc:2**0': 0.24; 'source': 0.25; 'post': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'especially': 0.30; 'message- id:@mail.gmail.com': 0.30; 'included': 0.31; 'code': 0.31; 'that.': 0.31; 'convenience': 0.31; 'equivalent.': 0.31; 'names.': 0.31; 'open': 0.33; 'url:python': 0.33; 'alone': 0.33; 'fri,': 0.33; 'implemented': 0.33; 'actual': 0.34; 'comment': 0.34; 'maybe': 0.34; "i'd": 0.34; 'could': 0.34; 'subject:with': 0.35; 'skip:u 20': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'there': 0.35; 'library.': 0.36; 'should': 0.36; 'project': 0.37; 'implement': 0.38; 'rather': 0.38; 'even': 0.60; "you're": 0.61; 'today': 0.64; 'pick': 0.64; 'stand': 0.64; 'more': 0.64; '30,': 0.65; 'license': 0.66; 'due': 0.66; 'hoping': 0.75; 'yourself': 0.78; 'heavy': 0.81; '(none': 0.84; 'bare': 0.84; 'important;': 0.84; 'notably,': 0.84; 'good,': 0.91; 'subject:Proposal': 0.91; 'to:none': 0.92 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=qGO+M8y38C41Pur0uu8qDxKNBQfA0Ww3H7r+Lo/fSnc=; b=dyVykZUdU9gxpflt/pa5DLpbNqSZluwAIXTwfsif56z/kgaoFrh76XzFMRVQU1eNM3 CXLnM28Ye9Vo2HfC4GdJYJP0aTWqhGLSN45AXh68u2DzzpnnL4QO0jMtpPbFU5uYP+zD xZda5+eTpPG9rbwEsrW67GOwusBcDpEyLfl0LvRAbof9YlCezw5E/u95YC11f+j+HoOO laOj0SYEgFnCov2Uo0v2AouD9176BKEDbUoYulAr+NYVOSPxHNydP5yu8qhPg6yP/OMw G2Dqs2v3cGoA5UQUk9+Y3cwbX3N0XglpRZH1W8uPKo6SLSPFj5MySQYcT4OCT5iX41v0 /Gxw== |
| MIME-Version | 1.0 |
| X-Received | by 10.220.69.72 with SMTP id y8mr10799629vci.21.1401417874335; Thu, 29 May 2014 19:44:34 -0700 (PDT) |
| In-Reply-To | <1401398515.60590.YahooMailNeo@web140106.mail.bf1.yahoo.com> |
| References | <1401398515.60590.YahooMailNeo@web140106.mail.bf1.yahoo.com> |
| Date | Fri, 30 May 2014 12:44:34 +1000 |
| Subject | Re: Proposal of an API to deal with fingerprints on Python |
| From | Chris Angelico <rosuav@gmail.com> |
| Cc | "python-list@python.org" <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.10472.1401417876.18130.python-list@python.org> (permalink) |
| Lines | 31 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1401417876 news.xs4all.nl 2879 [2001:888:2000:d::a6]:47190 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:72274 |
Show key headers only | View raw
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