Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #10374 > unrolled thread
| Started by | Stefan Behnel <stefan_ml@behnel.de> |
|---|---|
| First post | 2011-07-27 08:55 +0200 |
| Last post | 2011-07-27 08:55 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: seeking an example on C extension works in python 3.1.x or above Stefan Behnel <stefan_ml@behnel.de> - 2011-07-27 08:55 +0200
| From | Stefan Behnel <stefan_ml@behnel.de> |
|---|---|
| Date | 2011-07-27 08:55 +0200 |
| Subject | Re: seeking an example on C extension works in python 3.1.x or above |
| Message-ID | <mailman.1528.1311749763.1164.python-list@python.org> |
Terry Reedy, 27.07.2011 04:58: > On 7/26/2011 8:06 PM, llwaeva...@gmail.com wrote: >> I have been searching the example on C extension that works in python >> 3.1.x > > All the stdlib modules written in C. These are extension modules that come > with Python. There are perhaps a hundred more on PyPI. Or hundreds. 337 x C http://pypi.python.org/pypi?:action=browse&c=181 115 x C++ http://pypi.python.org/pypi?:action=browse&c=183 39 x Cython http://pypi.python.org/pypi?:action=browse&c=536 And that only includes those that properly state their implementation language (but I assume that's the large majority). I also (biasedly) second Dan's recommendation of using Cython instead of C, as that substantially reduces the chance of producing portability problems in the first place. It also substantially lowers the barrier of having to learn much about CPython's C-API and the inner workings and differences of CPython versions (at least at the C level). In case the question was about porting existing C code (the OP wasn't clear here), it's sometimes even faster to rewrite the code (or at least the glue code) in Cython than to port it to CPython 3.x. And the investment is a rather good bargain for reducing the future maintenance cost. Stefan
Back to top | Article view | comp.lang.python
csiph-web