mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 14:50:19 +00:00
Merge pull request #450 from ceaess/master
Improve Which Python section grammar
This commit is contained in:
@@ -20,38 +20,37 @@ The Future (Python 3)
|
||||
|
||||
`Further Reading <http://wiki.python.org/moin/Python2orPython3>`_
|
||||
|
||||
Python 3, on the other hand, differs much more greatly from Python 2, so
|
||||
writing code that works both on Python 2 and Python 3 is a very complicated
|
||||
The difference between Python 3 and Python 2 is much greater, therefore
|
||||
writing code that works in both Python 2 and Python 3 is a very complicated
|
||||
process.
|
||||
|
||||
It is still possible to `write code that works on Python 2.6, 2.7 and 3.3
|
||||
<http://lucumr.pocoo.org/2013/5/21/porting-to-python-3-redux/>`_. Depending on
|
||||
the kind of software you are writing, this might be either tricky or extremely
|
||||
hard, and if you're a beginner there are much more important things to worry
|
||||
about.
|
||||
It is possible to `write code that works on Python 2.6, 2.7 and 3.3
|
||||
<http://lucumr.pocoo.org/2013/5/21/porting-to-python-3-redux/>`_. This
|
||||
ranges from tricky to extremely hard depending upon the kind of software
|
||||
you are writing; if you're a beginner there are far more important things to
|
||||
worry about.
|
||||
|
||||
Implementations
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
There are several popular implementations of the Python programming language on
|
||||
different back-ends.
|
||||
When people speak of *Python* they often mean not just the language but also
|
||||
the CPython implementation. *Python* is actually a specification for a language
|
||||
that can be implemented in many different ways.
|
||||
|
||||
CPython
|
||||
-------
|
||||
|
||||
`CPython <http://www.python.org>`_ is the reference implementation of Python,
|
||||
written in C. It compiles Python code to intermediate bytecode which is then
|
||||
interpreted by a virtual machine. When people speak of *Python* they often mean
|
||||
not just the language but also this implementation. It provides the highest
|
||||
interpreted by a virtual machine. CPython provides the highest
|
||||
level of compatibility with Python packages and C extension modules.
|
||||
|
||||
If you are writing open-source Python code and want to reach the widest possible
|
||||
audience, targeting CPython is your best bet. If you need to use any packages
|
||||
that rely on C extensions for their functionality (e.g., numpy) then CPython
|
||||
is your only choice.
|
||||
audience, targeting CPython is best. To use packages which rely on C extensions
|
||||
to function, CPython is your only implementation option.
|
||||
|
||||
Being the reference implementation, all versions of the Python language are
|
||||
available as CPython.
|
||||
All versions of the Python language are implemented in C because CPython is the
|
||||
reference implementation.
|
||||
|
||||
PyPy
|
||||
----
|
||||
@@ -63,19 +62,18 @@ features a just-in-time compiler and supports multiple back-ends (C, CLI, JVM).
|
||||
PyPy aims for maximum compatibility with the reference CPython implementation
|
||||
while improving performance.
|
||||
|
||||
If you are looking to squeeze more performance out of your Python code, it's
|
||||
If you are looking to increase performance of your Python code, it's
|
||||
worth giving PyPy a try. On a suite of benchmarks, it's currently `over 5 times
|
||||
faster than CPython <http://speed.pypy.org/>`_.
|
||||
|
||||
Currently PyPy supports Python 2.7. PyPy3 which targets Python 3 was recently
|
||||
available as a beta release. [#pypy_ver]_
|
||||
PyPy supports Python 2.7. PyPy3 [#pypy_ver]_, released in beta, targets Python 3.
|
||||
|
||||
Jython
|
||||
------
|
||||
|
||||
`Jython <http://www.jython.org/>`_ is a Python implementation that compiles
|
||||
Python code to Java bytecode that is then executed in a JVM. It has the additional
|
||||
advantage of being able to import and use any Java class like a Python
|
||||
Python code to Java bytecode which is then executed by the JVM (Java Virtual Machine).
|
||||
Additionally, it is able to import and use any Java class like a Python
|
||||
module.
|
||||
|
||||
If you need to interface with an existing Java codebase or have other reasons to
|
||||
@@ -88,7 +86,7 @@ IronPython
|
||||
|
||||
`IronPython <http://ironpython.net/>`_ is an implementation of Python for the .NET
|
||||
framework. It can use both Python and .NET framework libraries, and can also
|
||||
expose Python code to other .NET languages.
|
||||
expose Python code to other languages in the .NET framework.
|
||||
|
||||
`Python Tools for Visual Studio <http://ironpython.net/tools/>`_ integrates
|
||||
IronPython directly into the Visual Studio development environment, making it
|
||||
|
||||
Reference in New Issue
Block a user