Improve Which Python section grammar

This commit is contained in:
Cea Stapleton
2014-06-06 11:44:01 -05:00
parent e7e9cd9a32
commit 0ce7c2d035
+20 -22
View File
@@ -20,38 +20,37 @@ The Future (Python 3)
`Further Reading <http://wiki.python.org/moin/Python2orPython3>`_ `Further Reading <http://wiki.python.org/moin/Python2orPython3>`_
Python 3, on the other hand, differs much more greatly from Python 2, so The difference between Python 3 and Python 2 is much greater, therefore
writing code that works both on Python 2 and Python 3 is a very complicated writing code that works in both Python 2 and Python 3 is a very complicated
process. process.
It is still possible to `write code that works on Python 2.6, 2.7 and 3.3 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/>`_. Depending on <http://lucumr.pocoo.org/2013/5/21/porting-to-python-3-redux/>`_. This
the kind of software you are writing, this might be either tricky or extremely ranges from tricky to extremely hard depending upon the kind of software
hard, and if you're a beginner there are much more important things to worry you are writing; if you're a beginner there are far more important things to
about. worry about.
Implementations Implementations
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
There are several popular implementations of the Python programming language on When people speak of *Python* they often mean not just the language but also
different back-ends. the CPython implementation. *Python* is actually a specification for a language
that can be implemented in many different ways.
CPython CPython
------- -------
`CPython <http://www.python.org>`_ is the reference implementation of Python, `CPython <http://www.python.org>`_ is the reference implementation of Python,
written in C. It compiles Python code to intermediate bytecode which is then 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 interpreted by a virtual machine. CPython provides the highest
not just the language but also this implementation. It provides the highest
level of compatibility with Python packages and C extension modules. 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 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 audience, targeting CPython is best. To use packages which rely on C extensions
that rely on C extensions for their functionality (e.g., numpy) then CPython to function, CPython is your only implementation option.
is your only choice.
Being the reference implementation, all versions of the Python language are All versions of the Python language are implemented in C because CPython is the
available as CPython. reference implementation.
PyPy 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 PyPy aims for maximum compatibility with the reference CPython implementation
while improving performance. 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 worth giving PyPy a try. On a suite of benchmarks, it's currently `over 5 times
faster than CPython <http://speed.pypy.org/>`_. faster than CPython <http://speed.pypy.org/>`_.
Currently PyPy supports Python 2.7. PyPy3 which targets Python 3 was recently PyPy supports Python 2.7. PyPy3 [#pypy_ver]_, released in beta, targets Python 3.
available as a beta release. [#pypy_ver]_
Jython Jython
------ ------
`Jython <http://www.jython.org/>`_ is a Python implementation that compiles `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 Python code to Java bytecode which is then executed by the JVM (Java Virtual Machine).
advantage of being able to import and use any Java class like a Python Additionally, it is able to import and use any Java class like a Python
module. module.
If you need to interface with an existing Java codebase or have other reasons to 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 `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 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 `Python Tools for Visual Studio <http://ironpython.net/tools/>`_ integrates
IronPython directly into the Visual Studio development environment, making it IronPython directly into the Visual Studio development environment, making it