Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #21483

Re: Porting the 2-3 heap data-structure library from C to Python

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.033
X-Spam-Evidence '*H*': 0.93; '*S*': 0.00; '(although': 0.05; 'subject:Python': 0.05; 'python': 0.08; '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; 'c-api': 0.16; 'contrary,': 0.16; 'from:addr:behnel.de': 0.16; 'from:addr:stefan_ml': 0.16; 'from:name:stefan behnel': 0.16; 'gained': 0.16; '>>>': 0.18; 'so.': 0.22; 'header:In-Reply-To:1': 0.22; 'documented': 0.23; 'extending': 0.23; 'itself,': 0.23; 'testing,': 0.23; 'stefan': 0.24; 'subject:data': 0.25; 'writes:': 0.25; 'code.': 0.26; 'code': 0.26; 'asking': 0.28; 'problem': 0.29; '(and': 0.30; 'dive': 0.30; '(the': 0.30; "didn't": 0.30; 'quite': 0.31; 'certainly': 0.32; 'that,': 0.32; 'ideal': 0.32; "can't": 0.33; 'header:User-Agent:1': 0.33; 'header:X-Complaints-To:1': 0.34; 'easiest': 0.34; 'received:84': 0.34; 'done': 0.34; '"we': 0.34; '(who': 0.34; 'to:addr:python-list': 0.35; 'list.': 0.35; 'received:org': 0.36; 'but': 0.37; 'using': 0.37; 'some': 0.38; 'doing': 0.38; 'think': 0.38; 'should': 0.38; 'easier': 0.38; 'subject:from': 0.39; 'everyone': 0.39; 'being': 0.40; 'to:addr:python.org': 0.40; "you'll": 0.61; 'more': 0.61; 'stop': 0.61; 'your': 0.61; 'world': 0.61; 'straight': 0.63; 'details': 0.64; 'making': 0.64; 'attitude': 0.67; 'discipline': 0.67; 'it)': 0.67; 'care': 0.71; 'beautiful': 0.71; 'promote': 0.76; 'invest': 0.80; 'free?': 0.84; 'fun)': 0.84; 'hand.': 0.84; 'standard,': 0.84; 'they,': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Stefan Behnel <stefan_ml@behnel.de>
Subject Re: Porting the 2-3 heap data-structure library from C to Python
Date Sun, 11 Mar 2012 08:41:17 +0100
References <mailman.465.1331130346.3037.python-list@python.org> <87boo89zul.fsf@xemacs.org> <mailman.473.1331137103.3037.python-list@python.org> <87399gne30.fsf@xemacs.org>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host dslb-084-056-019-108.pools.arcor-ip.net
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
In-Reply-To <87399gne30.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 <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.558.1331451692.3037.python-list@python.org> (permalink)
Lines 33
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1331451692 news.xs4all.nl 6947 [2001:888:2000:d::a6]:33219
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:21483

Show key headers only | View raw


Hrvoje Niksic, 11.03.2012 02:03:
> Stefan Behnel writes:
>>> 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.
> 
> I didn't say it was easy, but standard, in the sense of documented in
> Python documentation.  Python/C is as portable as Python itself, and as
> fast as the platform allows.

Only if you know how to do it right and have the discipline to do a lot of
cross-platform testing, benchmarking and tuning. Not everyone wants to
invest that much time into details that are unrelated to the problem at
hand. And why should they, when other people (who have gained some
experience in it) have already done if for them and continue to do that, so
that they don't need to care and can get it for free?


> I understand your desire to promote
> Cython, but please stop resorting to FUD in doing so.

I can't see it being FUD (although arguably promotion) to tell people that
"we write C so you don't have to". It's certainly not FUD that it's easier
(and IMHO also more fun) to write good Python code than good C code. Quite
the contrary, telling new users to go straight for writing C code and using
CPython's C-API natively is like asking them why (the heck!) they are using
Python in the first place, when they can just dive into the beautiful world
of C. I don't think that's the ideal attitude for this list.

Stefan

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Porting the 2-3 heap data-structure library from C to Python Alec Taylor <alec.taylor6@gmail.com> - 2012-03-08 01:25 +1100
  Re: Porting the 2-3 heap data-structure library from C to Python Hrvoje Niksic <hniksic@xemacs.org> - 2012-03-07 16:48 +0100
    Re: Porting the 2-3 heap data-structure library from C to Python Stefan Behnel <stefan_ml@behnel.de> - 2012-03-07 17:18 +0100
      Re: Porting the 2-3 heap data-structure library from C to Python Hrvoje Niksic <hniksic@xemacs.org> - 2012-03-11 02:03 +0100
        Re: Porting the 2-3 heap data-structure library from C to Python Terry Reedy <tjreedy@udel.edu> - 2012-03-10 21:17 -0500
        Re: Porting the 2-3 heap data-structure library from C to Python Stefan Behnel <stefan_ml@behnel.de> - 2012-03-11 08:41 +0100

csiph-web