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


Groups > comp.lang.python > #26478

Re: On-topic: alternate Python implementations

From Stefan Behnel <stefan_ml@behnel.de>
Subject Re: On-topic: alternate Python implementations
Date 2012-08-04 11:10 +0200
References <501cbdf8$0$29978$c3e8da3$5496439d@news.astraweb.com> <mailman.2925.1344062430.4697.python-list@python.org> <501cd421$0$29978$c3e8da3$5496439d@news.astraweb.com>
Newsgroups comp.lang.python
Message-ID <mailman.2927.1344071453.4697.python-list@python.org> (permalink)

Show all headers | View raw


Steven D'Aprano, 04.08.2012 09:49:
> On Sat, 04 Aug 2012 08:40:16 +0200, Stefan Behnel wrote:
>> And not to forget Cython, which is the only static Python compiler that
>> is widely used. Compiles and optimises Python to C code that uses the
>> CPython runtime and allows for easy manual optimisations to get C-like
>> performance out of it.
>>
>> http://cython.org/
> 
> Cython is great, but I question that it is a *Python* implementation. 
> That's not a criticism of Cython, but it is different from Python. Take 
> this example code from the tutorial:
> 
> from libc.math cimport sin
> 
> cdef double f(double x):
>     return sin(x*x)
> 
> If that's Python code, then I'm Ethel the Aardvark.

We never met in person, so I can't comment on the last part.

However, the above is Cython code and, yes, that's a different language.
Note that it uses a different file extension: ".pyx". Try putting the above
code into a .py file and compiling that. Cython will reject it and tell you
that "cimport" is not valid Python syntax.


> Cython is very Python-like, but there is no doubt in my mind that it is a 
> superset of Python and therefore a different language.

As long as you don't use any features of the Cython language, it's plain
Python. That makes it a Python compiler in my eyes. The fact that you can
easily use C features to optimise your code (also in Python syntax, BTW)
doesn't impact that.

You mentioned a couple of other implementations and I'm sure they have
features (and bugs) that CPython doesn't have. Interaction with Lisp code
in CLPython, for example. I don't think additional features or language
implementation bugs make a Python implementation non-Python per se.

Also note that most of the less widely known "alternative Python
implementations" do not even publish their results of running the CPython
test suite, so how do you actually know they can run Python code?

Stefan

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


Thread

On-topic: alternate Python implementations Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-04 06:15 +0000
  Re: On-topic: alternate Python implementations Chris Angelico <rosuav@gmail.com> - 2012-08-04 16:34 +1000
    Re: On-topic: alternate Python implementations Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-04 10:54 +0000
      Re: On-topic: alternate Python implementations Stefan Krah <stefan-usenet@bytereef.org> - 2012-08-04 13:18 +0200
        Re: On-topic: alternate Python implementations Paul Rubin <no.email@nospam.invalid> - 2012-08-04 08:59 -0700
          Re: On-topic: alternate Python implementations Stefan Behnel <stefan_ml@behnel.de> - 2012-08-04 18:55 +0200
            Re: On-topic: alternate Python implementations Paul Rubin <no.email@nospam.invalid> - 2012-08-04 11:18 -0700
              Re: On-topic: alternate Python implementations Stefan Behnel <stefan_ml@behnel.de> - 2012-08-04 21:06 +0200
                Re: On-topic: alternate Python implementations Paul Rubin <no.email@nospam.invalid> - 2012-08-04 13:43 -0700
                Re: On-topic: alternate Python implementations Stefan Behnel <stefan_ml@behnel.de> - 2012-08-04 23:24 +0200
              Re: On-topic: alternate Python implementations MRAB <python@mrabarnett.plus.com> - 2012-08-04 20:24 +0100
          Re: On-topic: alternate Python implementations Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-05 00:54 +0000
            Re: On-topic: alternate Python implementations Paul Rubin <no.email@nospam.invalid> - 2012-08-04 18:38 -0700
              Re: On-topic: alternate Python implementations Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-05 02:19 +0000
                Re: On-topic: alternate Python implementations John Nagle <nagle@animats.com> - 2012-08-06 22:57 -0700
              Re: On-topic: alternate Python implementations Stefan Behnel <stefan_ml@behnel.de> - 2012-08-05 07:37 +0200
            Re: On-topic: alternate Python implementations Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-04 23:09 -0400
      Re: On-topic: alternate Python implementations Stefan Behnel <stefan_ml@behnel.de> - 2012-08-04 13:32 +0200
  Re: On-topic: alternate Python implementations Stefan Behnel <stefan_ml@behnel.de> - 2012-08-04 08:40 +0200
    Re: On-topic: alternate Python implementations Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-04 07:49 +0000
      Re: On-topic: alternate Python implementations Stefan Behnel <stefan_ml@behnel.de> - 2012-08-04 11:10 +0200
        Re: On-topic: alternate Python implementations Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2012-08-04 14:51 +0200
          Re: On-topic: alternate Python implementations Stefan Behnel <stefan_ml@behnel.de> - 2012-08-04 15:53 +0200
            Re: On-topic: alternate Python implementations Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-08-08 10:29 +0200
          Re: On-topic: alternate Python implementations Stefan Behnel <stefan_ml@behnel.de> - 2012-08-04 16:03 +0200
      Re: On-topic: alternate Python implementations Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-04 11:05 +0100
      Re: On-topic: alternate Python implementations Stefan Behnel <stefan_ml@behnel.de> - 2012-08-04 12:59 +0200
      Re: On-topic: alternate Python implementations Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-04 19:24 +0100
        Re: On-topic: alternate Python implementations Temia Eszteri <lamialily@cleverpun.com> - 2012-08-04 11:34 -0700
        Re: On-topic: alternate Python implementations Ben Finney <ben+python@benfinney.id.au> - 2012-08-06 01:21 +1000
      Re: On-topic: alternate Python implementations Zero Piraeus <schesis@gmail.com> - 2012-08-04 14:42 -0400
      Re: On-topic: alternate Python implementations Zero Piraeus <schesis@gmail.com> - 2012-08-04 14:56 -0400
      Re: On-topic: alternate Python implementations Ethan Furman <ethan@stoneleaf.us> - 2012-08-05 07:27 -0700
  Re: On-topic: alternate Python implementations Tim Roberts <timr@probo.com> - 2012-08-04 13:07 -0700
  Re: On-topic: alternate Python implementations jwp <james.pye@gmail.com> - 2012-08-04 15:05 -0700
  Re: On-topic: alternate Python implementations Jürgen A. Erhard <jae+python@jaerhard.com> - 2012-08-05 01:25 +0200
  Re: On-topic: alternate Python implementations Stefan Behnel <stefan_ml@behnel.de> - 2012-08-05 07:46 +0200
  Re: On-topic: alternate Python implementations Stefan Behnel <stefan_ml@behnel.de> - 2012-08-05 09:51 +0200
  Re: On-topic: alternate Python implementations Jürgen A. Erhard <jae+python@jaerhard.com> - 2012-08-05 14:28 +0200
  Re: On-topic: alternate Python implementations alex23 <wuwei23@gmail.com> - 2012-08-05 20:40 -0700
    Re: On-topic: alternate Python implementations Stefan Behnel <stefan_ml@behnel.de> - 2012-08-06 08:21 +0200
  Re: On-topic: alternate Python implementations Stefan Behnel <stefan_ml@behnel.de> - 2012-08-06 08:46 +0200
  Alternate Python extensions (was alternate Python implementations) rusi <rustompmody@gmail.com> - 2012-08-06 21:23 -0700
    Re: Alternate Python extensions (was alternate Python implementations) Stefan Behnel <stefan_ml@behnel.de> - 2012-08-07 07:09 +0200

csiph-web