• Home
  • Raw
  • Download

Lines Matching refs:Python

6 Porting Extension Modules to Python 3
14 Although changing the C-API was not one of Python 3's objectives,
15 the many Python-level changes made leaving Python 2's API intact
25 The easiest way to compile only some code for Python 3 is to check
39 Python 3 merged together some types with similar functions while cleanly
46 Python 3's :func:`str` type is equivalent to Python 2's :func:`unicode`; the C
48 :func:`bytes`, with C functions called ``PyBytes_*``. Python 2.6 and later provide a compatibility…
50 compatibility with Python 3, :c:type:`PyUnicode` should be used for textual data and
52 :c:type:`PyBytes` and :c:type:`PyUnicode` in Python 3 are not interchangeable like
53 :c:type:`PyString` and :c:type:`PyUnicode` are in Python 2. The following example
58 #include "Python.h"
97 Python 3 has only one integer type, :func:`int`. But it actually
98 corresponds to Python 2's :func:`long` type—the :func:`int` type
99 used in Python 2 was removed. In the C-API, ``PyInt_*`` functions
106 Python 3 has a revamped extension module initialization system. (See
109 act correctly in both Python 2 and Python 3 is tricky. The following
112 #include "Python.h"
199 The :c:type:`Capsule` object was introduced in Python 3.1 and 2.7 to replace
209 Python 3.2. If you only support 2.7, or 3.1 and above, you
210 can simply switch to :c:type:`Capsule`. If you need to support Python 3.0,
211 or versions of Python earlier than 2.7,
213 (Note that Python 3.0 is no longer supported, and it is not recommended
219 :file:`Python.h`. Your code will automatically use Capsules
220 in versions of Python with Capsules, and switch to CObjects
243 You can find :file:`capsulethunk.h` in the Python source distribution
255 <http://cython.org/>`_. It translates a Python-like language to C. The
256 extension modules it creates are compatible with Python 3 and Python 2.