[Python-Dev] 2.4 news reaches interesting places

Phillip J. Eby pje at telecommunity.com
Thu Dec 9 22:37:59 CET 2004


At 04:11 PM 12/9/04 -0500, Glyph Lefkowitz wrote:
>On Wed, 2004-12-08 at 17:39 -0500, Phillip J. Eby wrote:
>
> > The only thing that will fix the PR issue is to have a Python compiler
> > distributed as part of the language.  It doesn't matter if it doesn't
> > support the full generality of Python, or even if it doesn't speed many
> > operations up much.  The only real requirements are that it can be used to
> > produce "native" executables, and that it be an official part of the
> > language, not a separately-distributed tool like Psyco or Pyrex.  Then, it
> > will perhaps be a sufficient "security blanket" to stop people FUDding
> > about it.
>
>I am aware that Pyrex is still in flux, so perhaps it is too soon to
>propose this even for 2.5, but I think it's worth bringing up anyway: I
>would like Pyrex to be distributed with the Python core.  I agree that
>it should be modified to produce full .exe files and not just .dlls on
>Windows, but many potential users *are* seriously concerned about
>efficiency and not just simplifying distribution.

+1 on all the stuff you said, with one minor exception.  Pyrex-the-language 
is often unpythonically ugly and verbose at present.  If Python had an 
official syntax for optional static type declaration, Pyrex's syntax could 
be aligned with that, and that would at least eliminate most of the inline 
'cdef' ugliness, leaving only C type declarations and Python property 
declarations as the main syntax issues to be resolved.  (Maybe by using 
something like the 'ctypes' API, and having the compiler recognize that 
API, such that C is directly callable from Python anyway, so compiling or 
interpreting Python makes no difference to ability to access C...  but I 
digress.)

Of course, this would take some effort from the core developers, especially 
Guido, to consider the various syntax needs and formulate official 
solutions.  But if it were done, the Python-vs.-Pyrex distinction could 
fade away altogether, replaced with the meme, "just add type declarations 
to slow parts, and tell Python you want the module compiled to C."

IOW, if Pyrex is merely the name of a compiler, not a separate language, 
then our master plan for world domination is complete.  :)



More information about the Python-Dev mailing list