Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

added 3 characters in body
Source Link
yak
  • 9.1k
  • 2
  • 35
  • 25

The example code you used is for ancient Python version, 2.3.2. Python 3.x line introduced a number of incompatibilites not only in the language but in the C API as well.

The functions you mention simply no longer exist in Python 3.2.

PyString_ functions were renamed to PyBytes_.

PyInt_ functions are gone, PyLong_ should be used instead.

Here's the same example that you've used but for Python 3:

5.3. Pure Embedding

Note that it's using PyUnicode_ instead of PyString_/PyBytes_. ManyIn many places where Python 2.x used byte strings, Python 3.x uses unicode strings.

By the way, I usually use this page to look up all possible calls:

Index – P

The example code you used is for ancient Python version, 2.3.2. Python 3.x line introduced a number of incompatibilites not only in the language but in the C API as well.

The functions you mention simply no longer exist in Python 3.2.

PyString_ functions were renamed to PyBytes_.

PyInt_ functions are gone, PyLong_ should be used instead.

Here's the same example that you've used but for Python 3:

5.3. Pure Embedding

Note that it's using PyUnicode_ instead of PyString_/PyBytes_. Many places where Python 2.x used byte strings, Python 3.x uses unicode strings.

By the way, I usually use this page to look up all possible calls:

Index – P

The example code you used is for ancient Python version, 2.3.2. Python 3.x line introduced a number of incompatibilites not only in the language but in the C API as well.

The functions you mention simply no longer exist in Python 3.2.

PyString_ functions were renamed to PyBytes_.

PyInt_ functions are gone, PyLong_ should be used instead.

Here's the same example that you've used but for Python 3:

5.3. Pure Embedding

Note that it's using PyUnicode_ instead of PyString_/PyBytes_. In many places where Python 2.x used byte strings, Python 3.x uses unicode strings.

By the way, I usually use this page to look up all possible calls:

Index – P

added 191 characters in body
Source Link
yak
  • 9.1k
  • 2
  • 35
  • 25

The example code you used is for ancient Python version, 2.3.2. Python 3.x line introduced a number of incompatibilites not only in the language but in the C API as well.

The functions you mention simply no longer exist in Python 3.2.

PyString_ functions were renamed to PyBytes_.

PyInt_ functions are gone, PyLong_ should be used instead.

Here's the same example that you've used but for Python 3:

5.3. Pure Embedding

Note that it's using PyUnicode_ instead of PyString_/PyBytes_. Many places where Python 2.x used byte strings, Python 3.x uses unicode strings.

By the way, I usually use this page to look up all possible calls:

http://docs.python.org/py3k/genindex-P.htmlIndex – P

The example code you used is for ancient Python version, 2.3.2. Python 3.x line introduced a number of incompatibilites not only in the language but in the C API as well.

The functions you mention simply no longer exist in Python 3.2.

PyString_ functions were renamed to PyBytes_.

PyInt_ functions are gone, PyLong_ should be used instead.

I usually use this page to look up all possible calls:

http://docs.python.org/py3k/genindex-P.html

The example code you used is for ancient Python version, 2.3.2. Python 3.x line introduced a number of incompatibilites not only in the language but in the C API as well.

The functions you mention simply no longer exist in Python 3.2.

PyString_ functions were renamed to PyBytes_.

PyInt_ functions are gone, PyLong_ should be used instead.

Here's the same example that you've used but for Python 3:

5.3. Pure Embedding

Note that it's using PyUnicode_ instead of PyString_/PyBytes_. Many places where Python 2.x used byte strings, Python 3.x uses unicode strings.

By the way, I usually use this page to look up all possible calls:

Index – P

Source Link
yak
  • 9.1k
  • 2
  • 35
  • 25

The example code you used is for ancient Python version, 2.3.2. Python 3.x line introduced a number of incompatibilites not only in the language but in the C API as well.

The functions you mention simply no longer exist in Python 3.2.

PyString_ functions were renamed to PyBytes_.

PyInt_ functions are gone, PyLong_ should be used instead.

I usually use this page to look up all possible calls:

http://docs.python.org/py3k/genindex-P.html

default

AltStyle によって変換されたページ (->オリジナル) /