Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!newsfeed20.multikabel.net!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:Python': 0.05; 'python': 0.08; 'necessary,': 0.09; 'python/c': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:library': 0.09; 'api': 0.09; 'from:addr:behnel.de': 0.16; 'from:addr:stefan_ml': 0.16; 'from:name:stefan behnel': 0.16; 'url:cosc': 0.16; 'header:In-Reply-To:1': 0.22; 'extending': 0.23; 'stefan': 0.24; 'subject:data': 0.25; 'writes:': 0.25; 'code.': 0.26; 'yes.': 0.30; 'certainly': 0.32; 'header:User-Agent:1': 0.33; 'header:X-Complaints-To:1': 0.34; 'easiest': 0.34; 'to:addr :python-list': 0.35; 'received:org': 0.36; 'class.': 0.37; 'url:ac': 0.37; 'should': 0.38; 'received:de': 0.39; 'subject:from': 0.39; 'to:addr:python.org': 0.40; "you'll": 0.61; 'making': 0.64; 'taylor': 0.67; 'url:nz': 0.67; 'url:c': 0.74; 'acquainted': 0.84; 'proves': 0.84; 'url:research': 0.91; 'available:': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Stefan Behnel Subject: Re: Porting the 2-3 heap data-structure library from C to Python Date: Wed, 07 Mar 2012 17:18:06 +0100 References: <87boo89zul.fsf@xemacs.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: fw-snc-frn5-de01.fw.telefonica.de User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 In-Reply-To: <87boo89zul.fsf@xemacs.org> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1331137103 news.xs4all.nl 6918 [2001:888:2000:d::a6]:37272 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:21323 Hrvoje Niksic, 07.03.2012 16:48: > Alec Taylor writes: > >> The source-code used has been made available: >> http://www.cosc.canterbury.ac.nz/research/RG/alg/ttheap.h >> http://www.cosc.canterbury.ac.nz/research/RG/alg/ttheap.c >> >> I plan on wrapping it in a class. > > You should get acquainted with the Python/C API If it proves necessary, yes. > which is the standard way of extending Python with high-performance > (and/or system-specific) C code. Well, it's *one* way. Certainly not the easiest way, neither the most portable and you'll have a hard time making it the fastest. Stefan