python-docs-fr/c-api.po

15410 lines
557 KiB
Plaintext

# SOME DESCRIPTIVE TITLE.
# Copyright (C) 1990-2010, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-10-13 09:45\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Translate Toolkit 1.7.0\n"
#: ../src/Doc/c-api/abstract.rst:8
msgid "Abstract Objects Layer"
msgstr "Couche d'Abstraction des Objets"
#: ../src/Doc/c-api/abstract.rst:10
msgid ""
"The functions in this chapter interact with Python objects regardless of "
"their type, or with wide classes of object types (e.g. all numerical types, "
"or all sequence types). When used on object types for which they do not "
"apply, they will raise a Python exception."
msgstr ""
"Dans ce chapitre, les fonctions s'appliquent à des objets Python sans tenir "
"compte de leur type, ou des classes d'objets au sens large (par exemple, "
"tous les types numériques, ou tous les types de séquence). Quand ils sont "
"utilisés sur des types d'objets qui ne correspondent pas, ils lèveront une "
"exception Python."
#: ../src/Doc/c-api/abstract.rst:15
#, fuzzy
msgid ""
"It is not possible to use these functions on objects that are not properly "
"initialized, such as a list object that has been created by :c:func:"
"`PyList_New`, but whose items have not been set to some non-\\ ``NULL`` "
"value yet."
msgstr ""
"Il n'est pas possible d'utiliser ces fonctions sur des objets qui n'ont pas "
"été correctement initialisés, comme un objet liste qui a été créé avec :"
"cfunc:`PyList_New` mais dont les éléments n'ont pas encore été mis à une "
"valeur non-\\ ``NULL``."
#: ../src/Doc/c-api/allocation.rst:6
msgid "Allocating Objects on the Heap"
msgstr "Allouer des objets dans le tas"
# b2f8a33570aa40f08e2fe46da3d52a11
#: ../src/Doc/c-api/allocation.rst:24
msgid ""
"Initialize a newly-allocated object *op* with its type and initial "
"reference. Returns the initialized object. If *type* indicates that the "
"object participates in the cyclic garbage detector, it is added to the "
"detector's set of observed objects. Other fields of the object are not "
"affected."
msgstr ""
# 8c5f5c89ed5843f8843e43f4f9e35e18
#: ../src/Doc/c-api/allocation.rst:33
msgid ""
"This does everything :c:func:`PyObject_Init` does, and also initializes the "
"length information for a variable-size object."
msgstr ""
# 1b04f81704f14f45b1bbbc1dda5fbebe
#: ../src/Doc/c-api/allocation.rst:43
msgid ""
"Allocate a new Python object using the C structure type *TYPE* and the "
"Python type object *type*. Fields not defined by the Python object header "
"are not initialized; the object's reference count will be one. The size of "
"the memory allocation is determined from the :c:member:`~PyTypeObject."
"tp_basicsize` field of the type object."
msgstr ""
# fb7d11b064e6492e9cacc2759e2cf73c
#: ../src/Doc/c-api/allocation.rst:52
msgid ""
"Allocate a new Python object using the C structure type *TYPE* and the "
"Python type object *type*. Fields not defined by the Python object header "
"are not initialized. The allocated memory allows for the *TYPE* structure "
"plus *size* fields of the size given by the :c:member:`~PyTypeObject."
"tp_itemsize` field of *type*. This is useful for implementing objects like "
"tuples, which are able to determine their size at construction time. "
"Embedding the array of fields into the same allocation decreases the number "
"of allocations, improving the memory management efficiency."
msgstr ""
# 203fabdbc207494185117fc38ddf1fa1
#: ../src/Doc/c-api/allocation.rst:68
msgid ""
"Releases memory allocated to an object using :c:func:`PyObject_New` or :c:"
"func:`PyObject_NewVar`. This is normally called from the :c:member:"
"`~PyTypeObject.tp_dealloc` handler specified in the object's type. The "
"fields of the object should not be accessed after this call as the memory is "
"no longer a valid Python object."
msgstr ""
# cfe90294645e4c309b47f76cd0091ed8
#: ../src/Doc/c-api/allocation.rst:77
msgid ""
"Create a new module object based on a name and table of functions, returning "
"the new module object."
msgstr ""
# 930f4cc7ce6a47fb80f72d3cda3a86a5
#: ../src/Doc/c-api/allocation.rst:87
msgid ""
"Create a new module object based on a name and table of functions, returning "
"the new module object. If *doc* is non-*NULL*, it will be used to define "
"the docstring for the module."
msgstr ""
# dd12234ea11a4aa58e062419f23e4c55
#: ../src/Doc/c-api/allocation.rst:98
msgid ""
"Create a new module object based on a name and table of functions, returning "
"the new module object. If *doc* is non-*NULL*, it will be used to define "
"the docstring for the module. If *self* is non-*NULL*, it will passed to "
"the functions of the module as their (otherwise *NULL*) first parameter. "
"(This was added as an experimental feature, and there are no known uses in "
"the current version of Python.) For *apiver*, the only value which should "
"be passed is defined by the constant :const:`PYTHON_API_VERSION`."
msgstr ""
# 9678d13005344f989ebb4819926b18cd
#: ../src/Doc/c-api/allocation.rst:109
msgid ""
"Most uses of this function should probably be using the :c:func:"
"`Py_InitModule3` instead; only use this if you are sure you need it."
msgstr ""
# 8186ba517b7f4592a6dbb0c75c57e5c4
#: ../src/Doc/c-api/allocation.rst:120
msgid ""
"Object which is visible in Python as ``None``. This should only be accessed "
"using the ``Py_None`` macro, which evaluates to a pointer to this object."
msgstr ""
#: ../src/Doc/c-api/arg.rst:6
msgid "Parsing arguments and building values"
msgstr "Analyse des arguments et construction des valeurs"
#: ../src/Doc/c-api/arg.rst:8
msgid ""
"These functions are useful when creating your own extensions functions and "
"methods. Additional information and examples are available in :ref:"
"`extending-index`."
msgstr ""
"Ces fonctions sont utiles pour créer vos propres fonctions et méthodes "
"d'extensions. Des informations supplémentaires et des exemples sont "
"disponibles ici: ref:`extending-index`."
#: ../src/Doc/c-api/arg.rst:12
#, fuzzy
msgid ""
"The first three of these functions described, :c:func:`PyArg_ParseTuple`, :c:"
"func:`PyArg_ParseTupleAndKeywords`, and :c:func:`PyArg_Parse`, all use "
"*format strings* which are used to tell the function about the expected "
"arguments. The format strings use the same syntax for each of these "
"functions."
msgstr ""
"Dans Les trois premières de ces fonctions décrites, :cfunc: "
"`PyArg_ParseTuple`, :cfunc: `PyArg_ParseTupleAndKeywords`, et :cfunc: "
"`PyArg_Parse`, toutes utilisent *des chaînes de format* qui sont utilisées "
"pour indiquer à la fonction les arguments attendus. Les chaînes de format "
"utilise la même syntaxe pour chacune de ces fonctions."
#: ../src/Doc/c-api/arg.rst:18
msgid ""
"A format string consists of zero or more \"format units.\" A format unit "
"describes one Python object; it is usually a single character or a "
"parenthesized sequence of format units. With a few exceptions, a format "
"unit that is not a parenthesized sequence normally corresponds to a single "
"address argument to these functions. In the following description, the "
"quoted form is the format unit; the entry in (round) parentheses is the "
"Python object type that matches the format unit; and the entry in [square] "
"brackets is the type of the C variable(s) whose address should be passed."
msgstr ""
"Une chaîne de format se compose de zéro ou plusieurs \"unités de format\". "
"Une unité de format décrit un objet Python, elle est généralement composée "
"d'un seul caractère ou d'une séquence d'unités de format entre parenthèses. "
"À quelques exceptions près, une unité de format qui n'est pas une séquence "
"entre parenthèses correspond normalement à un argument d'une seule adresse "
"pour ces fonctions. Dans la description qui suit, la forme entre guillemets "
"est l'unité de format, l'entrée entre parenthèses est le type d'objet Python "
"qui correspond à l'unité de format, et l'entrée entre crochets est le type "
"de la variable C (ou des variables) dont l'adresse doit être donnée."
#: ../src/Doc/c-api/arg.rst:27
#, fuzzy
msgid ""
"These formats allow to access an object as a contiguous chunk of memory. You "
"don't have to provide raw storage for the returned unicode or bytes area. "
"Also, you won't have to release any memory yourself, except with the ``es``, "
"``es#``, ``et`` and ``et#`` formats."
msgstr ""
"Ces formats n'attendent pas que vous fournissiez un stockage sous forme "
"brute pour les chaînes ou octets retournés. Alors, vous n'aurez pas à "
"libérer la mémoire vous-même, excepté pour les formats ``es``, ``es#``, "
"``et`` et ``et#``."
# 3c441cc297cf451986494883f2ff8075
#: ../src/Doc/c-api/arg.rst:38
msgid "``s`` (string or Unicode) [const char \\*]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:33
#, fuzzy
msgid ""
"Convert a Python string or Unicode object to a C pointer to a character "
"string. You must not provide storage for the string itself; a pointer to an "
"existing string is stored into the character pointer variable whose address "
"you pass. The C string is NUL-terminated. The Python string must not "
"contain embedded NUL bytes; if it does, a :exc:`TypeError` exception is "
"raised. Unicode objects are converted to C strings using the default "
"encoding. If this conversion fails, a :exc:`UnicodeError` is raised."
msgstr ""
"Convertir un objet Unicode en un pointeur C sur une chaîne de caractères. Un "
"pointeur sur une chaîne existante est stocké dans le pointeur de la variable "
"caractère dont vous passez l'adresse. La chaîne C est terminée par le "
"caractère NUL. La chaîne Python ne doit pas contenir d'octets NUL, sinon une "
"exception de type :exc:`TypeError` sera levée. Les objets Unicode sont "
"convertis en chaîne de caractères C avec l'encodage ``'utf-8'``. Si la "
"conversion échoue, une exception :exc:`UnicodeError` sera levée."
# 587f1d02d49d48c4b9149924026dc83d
#: ../src/Doc/c-api/arg.rst:51
msgid ""
"``s#`` (string, Unicode or any read buffer compatible object) [const char "
"\\*, int (or :c:type:`Py_ssize_t`, see below)]"
msgstr ""
# d1fd62dcb8dd47728cc5abae075ae577
#: ../src/Doc/c-api/arg.rst:42
msgid ""
"This variant on ``s`` stores into two C variables, the first one a pointer "
"to a character string, the second one its length. In this case the Python "
"string may contain embedded null bytes. Unicode objects pass back a pointer "
"to the default encoded string version of the object if such a conversion is "
"possible. All other read-buffer compatible objects pass back a reference to "
"the raw internal data representation."
msgstr ""
#: ../src/Doc/c-api/arg.rst:49
#, fuzzy
msgid ""
"Starting with Python 2.5 the type of the length argument can be controlled "
"by defining the macro :c:macro:`PY_SSIZE_T_CLEAN` before including :file:"
"`Python.h`. If the macro is defined, length is a :c:type:`Py_ssize_t` "
"rather than an int."
msgstr ""
"Pour toutes les variantes de formats ``#`` (``s#``, ``y#``, etc), le type de "
"l'argument longueur (int ou :ctype:`Py_ssize_t`) est contrôlé en définissant "
"la macro :cmacro:`PY_SSIZE_T_CLEAN` avant d'inclure le fichier :file:`Python."
"h`. Si la macro est définie, la longueur est de type :ctype:`Py_ssize_t` au "
"lieu d'être de type :ctype:`int`. Ce comportement changera dans une future "
"version de Python, qui supportera seulement :ctype:`Py_ssize_t` et plus :"
"ctype:`int`. Il est préférable de toujours définir :cmacro:"
"`PY_SSIZE_T_CLEAN`."
# 8508018381014f8393b11e8266ade210
#: ../src/Doc/c-api/arg.rst:60
msgid "``s*`` (string, Unicode, or any buffer compatible object) [Py_buffer]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:55
#, fuzzy
msgid ""
"Similar to ``s#``, this code fills a Py_buffer structure provided by the "
"caller. The buffer gets locked, so that the caller can subsequently use the "
"buffer even inside a ``Py_BEGIN_ALLOW_THREADS`` block; the caller is "
"responsible for calling ``PyBuffer_Release`` with the structure after it has "
"processed the data."
msgstr ""
"Néanmoins, quand une structure :ctype:`Py_buffer` est en cours de "
"remplissage, le tampon sous-jacent est verrouillé pour permettre à "
"l'appelant d'utiliser le buffer par la suite, même lorsqu'il est à "
"'intérieur d'un bloc :ctype:`Py_BEGIN_ALLOW_THREADS`. Ceci sans le risque "
"pour les données mutables de voir leur taille changée ou d'être supprimées. "
"En conséquence, **il vous appartient d'appeler** :cfunc:`PyBuffer_Release` "
"après que vous ayez terminé de traiter les données (ou après une "
"interruption prémataturée du traitement de ces données)."
# 86be65869e394d50a4280632ad11b64b
#: ../src/Doc/c-api/arg.rst:64
msgid "``z`` (string, Unicode or ``None``) [const char \\*]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:64
msgid ""
"Like ``s``, but the Python object may also be ``None``, in which case the C "
"pointer is set to *NULL*."
msgstr ""
"Comme ``s``, mais l'objet Python peut aussi être ``None``, auquel cas le "
"pointeur C devient *NULL*."
# 3400547efafe4e629f3999d38cb698ef
#: ../src/Doc/c-api/arg.rst:67
msgid ""
"``z#`` (string, Unicode, ``None`` or any read buffer compatible object) "
"[const char \\*, int]"
msgstr ""
# 8966a3122dc747399eeb87a1d0151bca
#: ../src/Doc/c-api/arg.rst:68
msgid "This is to ``s#`` as ``z`` is to ``s``."
msgstr ""
# f2e0f0f929204e0996332834a5f4d52f
#: ../src/Doc/c-api/arg.rst:72
msgid ""
"``z*`` (string, Unicode, ``None`` or any buffer compatible object) "
"[Py_buffer]"
msgstr ""
# 6e9e2f7190d44e399ced5189a5ad8892
#: ../src/Doc/c-api/arg.rst:71
msgid "This is to ``s*`` as ``z`` is to ``s``."
msgstr ""
# 56fd171f44804c12a6a4f624ba154374
#: ../src/Doc/c-api/arg.rst:79
msgid "``u`` (Unicode) [Py_UNICODE \\*]"
msgstr ""
# 3bdc1ebd59e7463fa9a6a8663990957d
#: ../src/Doc/c-api/arg.rst:76
msgid ""
"Convert a Python Unicode object to a C pointer to a NUL-terminated buffer of "
"16-bit Unicode (UTF-16) data. As with ``s``, there is no need to provide "
"storage for the Unicode data buffer; a pointer to the existing Unicode data "
"is stored into the :c:type:`Py_UNICODE` pointer variable whose address you "
"pass."
msgstr ""
# 9e8a660e136141f78552bcb5582ef65c
#: ../src/Doc/c-api/arg.rst:85
msgid "``u#`` (Unicode) [Py_UNICODE \\*, int]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:83
#, fuzzy
msgid ""
"This variant on ``u`` stores into two C variables, the first one a pointer "
"to a Unicode data buffer, the second one its length. Non-Unicode objects are "
"handled by interpreting their read-buffer pointer as pointer to a :c:type:"
"`Py_UNICODE` array."
msgstr ""
"Cette variante de ``u`` stocke son résultat dans deux variables C, la "
"première pointant vers un tampon de données Unicode, la seconde donnant sa "
"longueur."
# 71cb0c5cf3b54d62b321892b30605a73
#: ../src/Doc/c-api/arg.rst:104
msgid ""
"``es`` (string, Unicode or character buffer compatible object) [const char "
"\\*encoding, char \\*\\*buffer]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:89
#, fuzzy
msgid ""
"This variant on ``s`` is used for encoding Unicode and objects convertible "
"to Unicode into a character buffer. It only works for encoded data without "
"embedded NUL bytes."
msgstr ""
"Cette variante ``s`` est utilisée pour encoder de l'Unicode dans un buffer "
"de caractères. Cela ne fonctionne que pour les données encodées qui ne "
"contiennent pas d'octets NUL."
#: ../src/Doc/c-api/arg.rst:93
#, fuzzy
msgid ""
"This format requires two arguments. The first is only used as input, and "
"must be a :c:type:`const char\\*` which points to the name of an encoding as "
"a NUL-terminated string, or *NULL*, in which case the default encoding is "
"used. An exception is raised if the named encoding is not known to Python. "
"The second argument must be a :c:type:`char\\*\\*`; the value of the pointer "
"it references will be set to a buffer with the contents of the argument "
"text. The text will be encoded in the encoding specified by the first "
"argument."
msgstr ""
"Ce format requiert deux arguments. Le premier est seulement utilisé en "
"entrée, et doit être de type :ctype:`const char\\*`. Il pointe sur une "
"chaîne de caractères contenant le nom d'un encodage, terminée par NUL. Si "
"cette chaîne contient *NULL*, l'encoding ``'utf-8'`` sera utilisé. Une "
"exception sera levé si le nom de l'encodage est inconnu de Python. Le second "
"argument doit être de type :ctype:`char\\*\\*`, la valeur du pointeur qu'il "
"référence sera fixée à la valeur d'un tampon contenant le texte de "
"l'argument. Le texte sera encodé avec l'encodage spécifié dans le premier "
"argument. "
#: ../src/Doc/c-api/arg.rst:102
#, fuzzy
msgid ""
":c:func:`PyArg_ParseTuple` will allocate a buffer of the needed size, copy "
"the encoded data into this buffer and adjust *\\*buffer* to reference the "
"newly allocated storage. The caller is responsible for calling :c:func:"
"`PyMem_Free` to free the allocated buffer after use."
msgstr ""
":cfunc:`PyArg_ParseTuple` allouera un tampon de la taille nécessaire, "
"copiera les données encodées dans ce tampon et fera pointer *\\*buffer* vers "
"le nouveau tampon alloué. L'appelant est responsable de l'invocation de :"
"cfunc:`PyMem_Free` pour libérer le tampon alloué après utilisatiopn"
# cb66e1d51f0149a2af80a5e24b7e5b64
#: ../src/Doc/c-api/arg.rst:109
msgid ""
"``et`` (string, Unicode or character buffer compatible object) [const char "
"\\*encoding, char \\*\\*buffer]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:108
#, fuzzy
msgid ""
"Same as ``es`` except that 8-bit string objects are passed through without "
"recoding them. Instead, the implementation assumes that the string object "
"uses the encoding passed in as parameter."
msgstr ""
"Comme pour ``es``, excepté que les objets chaînes de caractères sont passées "
"sans les ré-encoder. À la place, l'implémentation assume que l'objet chaîne "
"de caractères utilise l'encodage passé en tant que paramètre."
# c83e4ce1d4cb4cf380cdbed9d9a4e6d0
#: ../src/Doc/c-api/arg.rst:141
msgid ""
"``es#`` (string, Unicode or character buffer compatible object) [const char "
"\\*encoding, char \\*\\*buffer, int \\*buffer_length]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:113
#, fuzzy
msgid ""
"This variant on ``s#`` is used for encoding Unicode and objects convertible "
"to Unicode into a character buffer. Unlike the ``es`` format, this variant "
"allows input data which contains NUL characters."
msgstr ""
"Cette variante de ``s#`` est utilisée pour encoder de l'Unicode dans un "
"tampon de caractères. Contrairement au format ``es``, cette variante "
"autorise les caractères NUL dans les données d'entrée."
#: ../src/Doc/c-api/arg.rst:117
#, fuzzy
msgid ""
"It requires three arguments. The first is only used as input, and must be "
"a :c:type:`const char\\*` which points to the name of an encoding as a NUL-"
"terminated string, or *NULL*, in which case the default encoding is used. "
"An exception is raised if the named encoding is not known to Python. The "
"second argument must be a :c:type:`char\\*\\*`; the value of the pointer it "
"references will be set to a buffer with the contents of the argument text. "
"The text will be encoded in the encoding specified by the first argument. "
"The third argument must be a pointer to an integer; the referenced integer "
"will be set to the number of bytes in the output buffer."
msgstr ""
"Ce format requiert deux arguments. Le premier est seulement utilisé en "
"entrée, et doit être de type :ctype:`const char\\*`. Il pointe sur une "
"chaîne de caractères contenant le nom d'un encodage, terminée par NUL. Si "
"cette chaîne contient *NULL*, l'encoding ``'utf-8'`` sera utilisé. Une "
"exception sera levé si le nom de l'encodage est inconnu de Python. Le second "
"argument doit être de type :ctype:`char\\*\\*`, la valeur du pointeur qu'il "
"référence sera fixée à la valeur d'un tampon contenant le texte de "
"l'argument. Le texte sera encodé avec l'encodage spécifié dans le premier "
"argument. Le troisième argument doit être un pointeur sur un entier ; "
"l'entier référencé sera positionné avec le nombre d'octets dans le tampon de "
"sortie"
#: ../src/Doc/c-api/arg.rst:127
msgid "There are two modes of operation:"
msgstr "Il existe deux modes de fonctionnement :"
#: ../src/Doc/c-api/arg.rst:129
#, fuzzy
msgid ""
"If *\\*buffer* points a *NULL* pointer, the function will allocate a buffer "
"of the needed size, copy the encoded data into this buffer and set *"
"\\*buffer* to reference the newly allocated storage. The caller is "
"responsible for calling :c:func:`PyMem_Free` to free the allocated buffer "
"after usage."
msgstr ""
"Si *\\*buffer* pointe sur un pointeur *NULL*, la fonction allouera un tampon "
"de la taille nécessaire, copiera les données encodées dans ce tampon et "
"mettra dans *\\*buffer* le nouveau tampon alloué. L'appelant est responsable "
"de la libération de la mémoire après utilisation du tampon, par un appel à :"
"cfunc:`PyMem_Free`."
#: ../src/Doc/c-api/arg.rst:135
#, fuzzy
msgid ""
"If *\\*buffer* points to a non-*NULL* pointer (an already allocated "
"buffer), :c:func:`PyArg_ParseTuple` will use this location as the buffer and "
"interpret the initial value of *\\*buffer_length* as the buffer size. It "
"will then copy the encoded data into the buffer and NUL-terminate it. If "
"the buffer is not large enough, a :exc:`ValueError` will be set."
msgstr ""
"Si *\\*buffer* pointe sur un pointeur qui n'est pas *NULL* (un tampon déjà "
"alloué), :cfunc:`PyArg_ParseTuple` utilisera cet espace comme le tampon et "
"interprétera la valeur initiale de *\\*buffer_length* comme la taille du "
"tampon. Il copiera alors les données encodées dans le tampon et terminera ce "
"dernier par NUL. Si le tampon n'est pas de taille suffisante, une exception :"
"exc:`ValueError` sera levée."
#: ../src/Doc/c-api/arg.rst:141
msgid ""
"In both cases, *\\*buffer_length* is set to the length of the encoded data "
"without the trailing NUL byte."
msgstr ""
"Dans les deux cas, *\\*buffer_length* est la longueur des données encodées, "
"sans l'octet NUL de fin."
# 94d46542f47b4c97b118b955363ad505
#: ../src/Doc/c-api/arg.rst:146
msgid ""
"``et#`` (string, Unicode or character buffer compatible object) [const char "
"\\*encoding, char \\*\\*buffer, int \\*buffer_length]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:145
#, fuzzy
msgid ""
"Same as ``es#`` except that string objects are passed through without "
"recoding them. Instead, the implementation assumes that the string object "
"uses the encoding passed in as parameter."
msgstr ""
"Comme pour ``es#`` excepté que les objets chaînes de caractères sont traités "
"sans recodage. À la place, l'implémentation assume que les objets de type "
"chaînes de caractères utilisent l'encodage passé en tant que paramètre."
# 82e915bea5b749619ece8f0916733f1a
#: ../src/Doc/c-api/arg.rst:150
msgid "``b`` (integer) [unsigned char]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:150
#, fuzzy
msgid ""
"Convert a nonnegative Python integer to an unsigned tiny int, stored in a C :"
"c:type:`unsigned char`."
msgstr ""
"Convertit un entier Python positif ou nul en un unsigned tiny int, stocké "
"dans un C :ctype:`unsigned char`."
# 4aec01efcef9401a81c62927e9e4d9ef
# 8751aadfa71542e7872d2196bf86b1fe
#: ../src/Doc/c-api/arg.rst:156 ../src/Doc/c-api/arg.rst:483
msgid "``B`` (integer) [unsigned char]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:154
#, fuzzy
msgid ""
"Convert a Python integer to a tiny int without overflow checking, stored in "
"a C :c:type:`unsigned char`."
msgstr ""
"Convertit un entier Python en un tiny int sans vérifier le débordement, "
"stocké dans un C :ctype:`unsigned char`."
# a69313cbfe1a4df8a5e4ad9b302b5c19
# 845b0112d35b475687eb57a42dcda5c4
#: ../src/Doc/c-api/arg.rst:159 ../src/Doc/c-api/arg.rst:477
msgid "``h`` (integer) [short int]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:160
#, fuzzy
msgid "Convert a Python integer to a C :c:type:`short int`."
msgstr "Convertit un entier Python en un C :ctype:`short int`."
# 31a8ef69d28f4607a5a083bb13a3aaf4
# 3fce801b2ce944399012cea3e7b45a24
#: ../src/Doc/c-api/arg.rst:165 ../src/Doc/c-api/arg.rst:486
msgid "``H`` (integer) [unsigned short int]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:163
#, fuzzy
msgid ""
"Convert a Python integer to a C :c:type:`unsigned short int`, without "
"overflow checking."
msgstr ""
"Convertit un entier Python en un C :ctype:`unsigned short int`, sans "
"contrôle de débordement."
# 44e0cf6a3eea437b9c7958cd6fdac2a4
# 24cb61e8dbf049c38d1bd1377ba9df86
#: ../src/Doc/c-api/arg.rst:168 ../src/Doc/c-api/arg.rst:471
msgid "``i`` (integer) [int]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:169
#, fuzzy
msgid "Convert a Python integer to a plain C :c:type:`int`."
msgstr "Convertit un entier Python en un type C :ctype:`int`."
# 6d49329fb94c4c5a802f83b371df4ed2
#: ../src/Doc/c-api/arg.rst:174
msgid "``I`` (integer) [unsigned int]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:172
#, fuzzy
msgid ""
"Convert a Python integer to a C :c:type:`unsigned int`, without overflow "
"checking."
msgstr ""
"Convertit un entier Python en un type C :ctype:`unsigned int`, sans contrôle "
"de le débordement."
# da656ff0f94a4e4baef2942ee86afcdd
# ba93f116f51f4e5c81273c4af48b6fd7
#: ../src/Doc/c-api/arg.rst:177 ../src/Doc/c-api/arg.rst:480
msgid "``l`` (integer) [long int]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:178
#, fuzzy
msgid "Convert a Python integer to a C :c:type:`long int`."
msgstr "Convertit un entier Python en un type :ctype:`long int`."
# eb9c7aea54554aa9a236efaeaea6b64a
#: ../src/Doc/c-api/arg.rst:183
msgid "``k`` (integer) [unsigned long]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:181
#, fuzzy
msgid ""
"Convert a Python integer or long integer to a C :c:type:`unsigned long` "
"without overflow checking."
msgstr ""
"Convertit un entier Python en un type C :ctype:`unsigned long` sans en "
"vérifier le débordement."
# e957c8186cfb40d6bca723b244b829f7
#: ../src/Doc/c-api/arg.rst:188
msgid "``L`` (integer) [PY_LONG_LONG]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:187
#, fuzzy
msgid ""
"Convert a Python integer to a C :c:type:`long long`. This format is only "
"available on platforms that support :c:type:`long long` (or :c:type:`_int64` "
"on Windows)."
msgstr ""
"Convertit un entier Python en un type C :ctype:`long long`. Ce format est "
"uniquement disponible sur les plates-formes qui prennent en charge :ctype:"
"`long long` (ou :ctype:`_int64` sous Windows)."
# 45eec5c3136d491fa74520731b52d9af
#: ../src/Doc/c-api/arg.rst:196
msgid "``K`` (integer) [unsigned PY_LONG_LONG]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:192
#, fuzzy
msgid ""
"Convert a Python integer or long integer to a C :c:type:`unsigned long long` "
"without overflow checking. This format is only available on platforms that "
"support :c:type:`unsigned long long` (or :c:type:`unsigned _int64` on "
"Windows)."
msgstr ""
"Convertit un entier Python en un type C :ctype:`unsigned long long` sans en "
"vérifier le débordement. Ce format est uniquement disponible sur les plates-"
"formes qui prennent en charge :ctype:`unsigned long long` (ou :ctype:"
"`unsigned _int64` sous Windows)."
# a163604ac6bd499f992b26ea850fb552
#: ../src/Doc/c-api/arg.rst:201
msgid "``n`` (integer) [Py_ssize_t]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:200
#, fuzzy
msgid "Convert a Python integer or long integer to a C :c:type:`Py_ssize_t`."
msgstr "Convertit un entier Python en un type C :ctype:`Py_ssize_t`."
# 91a530e5d5574bd48f0c74b01f63ece1
# 2bd218db212a48b98d5699837f98022d
#: ../src/Doc/c-api/arg.rst:205 ../src/Doc/c-api/arg.rst:511
msgid "``c`` (string of length 1) [char]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:205
#, fuzzy
msgid ""
"Convert a Python character, represented as a string of length 1, to a C :c:"
"type:`char`."
msgstr ""
"Convertit un caractère Python, représenté comme un objet :class:`str` de "
"longueur 1, en un type C :ctype:`int`."
# b67102595bf641d6a624008fa3457392
# 8c43e071710146d0a06360d42457b0e0
#: ../src/Doc/c-api/arg.rst:208 ../src/Doc/c-api/arg.rst:517
msgid "``f`` (float) [float]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:209
#, fuzzy
msgid "Convert a Python floating point number to a C :c:type:`float`."
msgstr "Convertit un nombre flottant Python vers un type C :ctype:`float`."
# c60164235e1a44fd965e2cc1b7ed111d
# e3b31a6d058b4d4997e598379dd71042
#: ../src/Doc/c-api/arg.rst:211 ../src/Doc/c-api/arg.rst:514
msgid "``d`` (float) [double]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:212
#, fuzzy
msgid "Convert a Python floating point number to a C :c:type:`double`."
msgstr "Convertit un nombre flottant Python vers un type C :ctype:`double`."
# f5b36f51a187437f9c0ba44b18bf61d9
#: ../src/Doc/c-api/arg.rst:214
msgid "``D`` (complex) [Py_complex]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:215
#, fuzzy
msgid "Convert a Python complex number to a C :c:type:`Py_complex` structure."
msgstr ""
"Convertit un nombre complexe Python vers une structure C :ctype:`Py_complex`."
# 9accdf5b741d44f78cf29151bfc0890c
# b9db1f06d0414eff9a54ba26766cdc71
#: ../src/Doc/c-api/arg.rst:219 ../src/Doc/c-api/arg.rst:528
msgid "``O`` (object) [PyObject \\*]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:218
msgid ""
"Store a Python object (without any conversion) in a C object pointer. The C "
"program thus receives the actual object that was passed. The object's "
"reference count is not increased. The pointer stored is not *NULL*."
msgstr ""
"Stocke un objet Python (sans aucune conversion) en un pointeur sur un objet "
"C. Ainsi, Le programme C reçoit l'objet réel qui a été passé. Le compteur de "
"référence sur l'objet n'est pas incrémenté. Le pointeur stocké n'est pas "
"*NULL*."
# 487b75e2702c4e1fa662ccb1716ba71c
#: ../src/Doc/c-api/arg.rst:226
msgid "``O!`` (object) [*typeobject*, PyObject \\*]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:223
#, fuzzy
msgid ""
"Store a Python object in a C object pointer. This is similar to ``O``, but "
"takes two C arguments: the first is the address of a Python type object, the "
"second is the address of the C variable (of type :c:type:`PyObject\\*`) into "
"which the object pointer is stored. If the Python object does not have the "
"required type, :exc:`TypeError` is raised."
msgstr ""
"Stocke un objet Python en pointeur sur un objet C. C'est comparable à ``O``, "
"mais la fonction prend deux arguments C : le premier est l'adresse d'un "
"objet de type Python, le second est l'adresse d'une variable C (de type :"
"ctype:`P:exc:`TypeError`yObject\\*`) dans laquelle le pointeur sur l'objet "
"sera stocké. Si l'objet Python n'est pas du type requis, une exception :exc:"
"`TypeError` sera levée."
# 086176eb60294f98b32d82721645e1d9
# a29ee7e00ae74ea3b72f7942e71f485c
#: ../src/Doc/c-api/arg.rst:241 ../src/Doc/c-api/arg.rst:542
msgid "``O&`` (object) [*converter*, *anything*]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:230
#, fuzzy
msgid ""
"Convert a Python object to a C variable through a *converter* function. This "
"takes two arguments: the first is a function, the second is the address of a "
"C variable (of arbitrary type), converted to :c:type:`void \\*`. The "
"*converter* function in turn is called as follows::"
msgstr ""
"Converti un objet Python en une variable C en utilisant une fonction de "
"*conversion*. La fonction prend deux arguments : le premier est une "
"fonction, le second est l'adresse d'une variable C (de type arbitraire), "
"convertie en :ctype:`void \\*`. La fonction de *conversion* est appellée à "
"son tour de la manière suivante :"
#: ../src/Doc/c-api/arg.rst:237
#, fuzzy
msgid ""
"where *object* is the Python object to be converted and *address* is the :c:"
"type:`void\\*` argument that was passed to the :c:func:`PyArg_Parse\\*` "
"function. The returned *status* should be ``1`` for a successful conversion "
"and ``0`` if the conversion has failed. When the conversion fails, the "
"*converter* function should raise an exception and leave the content of "
"*address* unmodified."
msgstr ""
"Où *objet* est l'objet Python à convertir et *adresse* est l'argument de "
"type :ctype:`void\\*` qui a été passé à la function :cfunc:`PyArg_Parse\\*`. "
"Le status retourné devrait être ``1`` pour conversion réussie, et ``0`` si "
"la conversion a échouée. Quand la conversion échoue, la fonction de "
"*conversion* devrait lever une exception et laisser le contenu de *adresse* "
"non modifié."
# 5dfe72d7469145f8aea75f323460be04
#: ../src/Doc/c-api/arg.rst:246
msgid "``S`` (string) [PyStringObject \\*]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:245
#, fuzzy
msgid ""
"Like ``O`` but requires that the Python object is a string object. Raises :"
"exc:`TypeError` if the object is not a string object. The C variable may "
"also be declared as :c:type:`PyObject\\*`."
msgstr ""
"Exige que l'objet Python soit un objet Unicode, sans tenter aucune "
"conversion. Lève une :exc:`TypeError` si l'objet n'est pas un objet Unicode. "
"La variable C peut également être déclarée en tant que :ctype:`PyObject\\*`."
# 725e656c3f414128b5a205381f208c80
#: ../src/Doc/c-api/arg.rst:251
msgid "``U`` (Unicode string) [PyUnicodeObject \\*]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:250
#, fuzzy
msgid ""
"Like ``O`` but requires that the Python object is a Unicode object. Raises :"
"exc:`TypeError` if the object is not a Unicode object. The C variable may "
"also be declared as :c:type:`PyObject\\*`."
msgstr ""
"Exige que l'objet Python soit un objet Unicode, sans tenter aucune "
"conversion. Lève une :exc:`TypeError` si l'objet n'est pas un objet Unicode. "
"La variable C peut également être déclarée en tant que :ctype:`PyObject\\*`."
# 4453ef335bdd4136a64b787aac0947b9
#: ../src/Doc/c-api/arg.rst:258
msgid "``t#`` (read-only character buffer) [char \\*, int]"
msgstr ""
# 7869543094d64959b4210496b268663c
#: ../src/Doc/c-api/arg.rst:255
msgid ""
"Like ``s#``, but accepts any object which implements the read-only buffer "
"interface. The :c:type:`char\\*` variable is set to point to the first byte "
"of the buffer, and the :c:type:`int` is set to the length of the buffer. "
"Only single-segment buffer objects are accepted; :exc:`TypeError` is raised "
"for all others."
msgstr ""
# ede31a1727654ee3bb098a88e383176a
#: ../src/Doc/c-api/arg.rst:264
msgid "``w`` (read-write character buffer) [char \\*]"
msgstr ""
# 9c55c960a2a846a49eaff59a51dbf27d
#: ../src/Doc/c-api/arg.rst:262
msgid ""
"Similar to ``s``, but accepts any object which implements the read-write "
"buffer interface. The caller must determine the length of the buffer by "
"other means, or use ``w#`` instead. Only single-segment buffer objects are "
"accepted; :exc:`TypeError` is raised for all others."
msgstr ""
# 88e4a11619b04cb883b0fc19dfcbde99
#: ../src/Doc/c-api/arg.rst:271
msgid "``w#`` (read-write character buffer) [char \\*, Py_ssize_t]"
msgstr ""
# c13b19b5d6a5422e863413a8b7f462ea
#: ../src/Doc/c-api/arg.rst:268
msgid ""
"Like ``s#``, but accepts any object which implements the read-write buffer "
"interface. The :c:type:`char \\*` variable is set to point to the first "
"byte of the buffer, and the :c:type:`Py_ssize_t` is set to the length of the "
"buffer. Only single-segment buffer objects are accepted; :exc:`TypeError` "
"is raised for all others."
msgstr ""
# b3a389f9b84948daab67cfb185dc54ff
#: ../src/Doc/c-api/arg.rst:276
msgid "``w*`` (read-write byte-oriented buffer) [Py_buffer]"
msgstr ""
# da970fe8e2664df19a11934a5514df53
#: ../src/Doc/c-api/arg.rst:275
msgid "This is to ``w`` what ``s*`` is to ``s``."
msgstr ""
# 7f63cfb972fe4bcbafe185a7239de8a5
# 74d9b630a06d481f89450e8cd8704edd
#: ../src/Doc/c-api/arg.rst:289 ../src/Doc/c-api/arg.rst:546
msgid "``(items)`` (tuple) [*matching-items*]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:280
msgid ""
"The object must be a Python sequence whose length is the number of format "
"units in *items*. The C arguments must correspond to the individual format "
"units in *items*. Format units for sequences may be nested."
msgstr ""
"L'objet doit être une séquence Python dont la longueur est le nombre "
"d'unités de formats dans *articles*. Les arguments C doivent correspondre à "
"chaque unité de format particulière dans *articles*. Les unités de formats "
"pour les séquences peuvent être imbriquées. "
# 676c4ddaffc44f008cb2bec58423f5fb
#: ../src/Doc/c-api/arg.rst:286
msgid ""
"Prior to Python version 1.5.2, this format specifier only accepted a tuple "
"containing the individual parameters, not an arbitrary sequence. Code which "
"previously caused :exc:`TypeError` to be raised here may now proceed without "
"an exception. This is not expected to be a problem for existing code."
msgstr ""
#: ../src/Doc/c-api/arg.rst:292
#, fuzzy
msgid ""
"It is possible to pass Python long integers where integers are requested; "
"however no proper range checking is done --- the most significant bits are "
"silently truncated when the receiving field is too small to receive the "
"value (actually, the semantics are inherited from downcasts in C --- your "
"mileage may vary)."
msgstr ""
"Il est possible de passer des entiers de type \"long\" (dont la valeur "
"dépasse le :const:`LONG_MAX` de la plateforme), cependant aucun contrôle "
"d'intervalle n'est effectué --- les bits les plus significatifs sont "
"tronqués silencieusement quand le champ cible est trop petit (en fait, la "
"sémantique est héritée du transtypage en C --- la perte peut varier)."
#: ../src/Doc/c-api/arg.rst:298
msgid ""
"A few other characters have a meaning in a format string. These may not "
"occur inside nested parentheses. They are:"
msgstr ""
"Quelques autres caractères ont un sens dans une chaîne de format. On ne doit "
"pas les trouvées dans des parenthèses imbriquées. Ce sont :"
# 36686b36b42c460fb967e98ebc6b5d5a
#: ../src/Doc/c-api/arg.rst:305
msgid "``|``"
msgstr ""
#: ../src/Doc/c-api/arg.rst:302
#, fuzzy
msgid ""
"Indicates that the remaining arguments in the Python argument list are "
"optional. The C variables corresponding to optional arguments should be "
"initialized to their default value --- when an optional argument is not "
"specified, :c:func:`PyArg_ParseTuple` does not touch the contents of the "
"corresponding C variable(s)."
msgstr ""
"Incique que les arguments restants dans la liste Python des arguments sont "
"optionels. Les variables C correspondant à ces arguments optionnels "
"devraient être initialisés avec leur valeur par défaut --- quan un argument "
"optionnel n'est pas spécifié, la fonction :cfunc:`PyArg_ParseTuple` ne "
"modifie par le contenu de la ou des variables C correspondantes."
# 7ad8d6689464479ba31201802843bd7d
#: ../src/Doc/c-api/arg.rst:310
msgid "``:``"
msgstr ""
#: ../src/Doc/c-api/arg.rst:309
#, fuzzy
msgid ""
"The list of format units ends here; the string after the colon is used as "
"the function name in error messages (the \"associated value\" of the "
"exception that :c:func:`PyArg_ParseTuple` raises)."
msgstr ""
"La liste des unités de format s'arrête ici ; la chaîne après les deux-points "
"est utilisée comme le nom de la fonction dans les messages d'erreur (la "
"\"valeur associée\" de l'exception levée par :cfunc:`PyArg_ParseTuple`)."
# 0be3d018f4944485911eee5620192ae3
#: ../src/Doc/c-api/arg.rst:315
msgid "``;``"
msgstr ""
#: ../src/Doc/c-api/arg.rst:314
msgid ""
"The list of format units ends here; the string after the semicolon is used "
"as the error message *instead* of the default error message. ``:`` and ``;"
"`` mutually exclude each other."
msgstr ""
"La liste des unités de format s'arrête ici ; la chaîne après le point-"
"virgule est utilise comme message d'erreur *au lieu* du message d'erreur par "
"défaut. ``:`` et ``;`` sont mutuellement exclusifs. "
#: ../src/Doc/c-api/arg.rst:318
msgid ""
"Note that any Python object references which are provided to the caller are "
"*borrowed* references; do not decrement their reference count!"
msgstr ""
"Notez que n'importe quelles références sur un objet Python qui sont données "
"à l'appelant sont des références *empruntées* ; ne décrémentez pas leur "
"compteur de références ! "
#: ../src/Doc/c-api/arg.rst:321
msgid ""
"Additional arguments passed to these functions must be addresses of "
"variables whose type is determined by the format string; these are used to "
"store values from the input tuple. There are a few cases, as described in "
"the list of format units above, where these parameters are used as input "
"values; they should match what is specified for the corresponding format "
"unit in that case."
msgstr ""
"Les arguments additionnels qui sont donnés à ces fonctions doivent être des "
"adresses de variables dont le type est déterminé par la chaîine de format. "
"Elles sont utilisées pour stocker les valeurs du n-uplet d'entrée. Il y a "
"quelques cas, comme décrit précédemment dans le liste des unités de formats, "
"où ces paramètres sont utilisés comme valeurs d'entrée. Dans ce cas, ils "
"devraient correspondre à ce qui est spécifié pour l'unité de format "
"correspondante."
#: ../src/Doc/c-api/arg.rst:327
#, fuzzy
msgid ""
"For the conversion to succeed, the *arg* object must match the format and "
"the format must be exhausted. On success, the :c:func:`PyArg_Parse\\*` "
"functions return true, otherwise they return false and raise an appropriate "
"exception. When the :c:func:`PyArg_Parse\\*` functions fail due to "
"conversion failure in one of the format units, the variables at the "
"addresses corresponding to that and the following format units are left "
"untouched."
msgstr ""
"Pour que la conversion réussise, l'objet *arg* doit correspondre au format, "
"et le format doit être épuisé. En cas de succès, les fonctions :cfunc:"
"`PyArg_Parse\\*` retournent vrai, sinon elles retournent faux et lèvent "
"l'exception appropriée. Quand une fonction :cfunc:`PyArg_Parse\\*` échoue en "
"raison d'une erreur de conversion dans une des unités de format, les "
"variables aux adresses correspondantes à cette erreur et les unités de "
"formats suivantes sont laissées telles quelles."
# 4ec07e3d677f44b5a24bd930af3fbe0a
#: ../src/Doc/c-api/arg.rst:337
msgid ""
"Parse the parameters of a function that takes only positional parameters "
"into local variables. Returns true on success; on failure, it returns false "
"and raises the appropriate exception."
msgstr ""
# 5d23fe7ac0ab452aa2347de7509a03d7
#: ../src/Doc/c-api/arg.rst:344
msgid ""
"Identical to :c:func:`PyArg_ParseTuple`, except that it accepts a va_list "
"rather than a variable number of arguments."
msgstr ""
# 9adeea4fe4f74055bdc014fe2a409b99
#: ../src/Doc/c-api/arg.rst:350
msgid ""
"Parse the parameters of a function that takes both positional and keyword "
"parameters into local variables. Returns true on success; on failure, it "
"returns false and raises the appropriate exception."
msgstr ""
# 6a76993381ba4fdca0f4c6ac6c4511f2
#: ../src/Doc/c-api/arg.rst:357
msgid ""
"Identical to :c:func:`PyArg_ParseTupleAndKeywords`, except that it accepts a "
"va_list rather than a variable number of arguments."
msgstr ""
# c5e06645c13e4df0bd8ee05e1f666ce3
#: ../src/Doc/c-api/arg.rst:363
msgid ""
"Function used to deconstruct the argument lists of \"old-style\" functions "
"--- these are functions which use the :const:`METH_OLDARGS` parameter "
"parsing method. This is not recommended for use in parameter parsing in new "
"code, and most code in the standard interpreter has been modified to no "
"longer use this for that purpose. It does remain a convenient way to "
"decompose other tuples, however, and may continue to be used for that "
"purpose."
msgstr ""
# 302a4e7528cd451784fde4203aae60f6
#: ../src/Doc/c-api/arg.rst:374
msgid ""
"A simpler form of parameter retrieval which does not use a format string to "
"specify the types of the arguments. Functions which use this method to "
"retrieve their parameters should be declared as :const:`METH_VARARGS` in "
"function or method tables. The tuple containing the actual parameters "
"should be passed as *args*; it must actually be a tuple. The length of the "
"tuple must be at least *min* and no more than *max*; *min* and *max* may be "
"equal. Additional arguments must be passed to the function, each of which "
"should be a pointer to a :c:type:`PyObject\\*` variable; these will be "
"filled in with the values from *args*; they will contain borrowed "
"references. The variables which correspond to optional parameters not given "
"by *args* will not be filled in; these should be initialized by the caller. "
"This function returns true on success and false if *args* is not a tuple or "
"contains the wrong number of elements; an exception will be set if there was "
"a failure."
msgstr ""
# cb3fca3d06a340a1bf6be151a0da5504
#: ../src/Doc/c-api/arg.rst:388
msgid ""
"This is an example of the use of this function, taken from the sources for "
"the :mod:`_weakref` helper module for weak references::"
msgstr ""
# c471c50f307d4573a95ac8d6e4e8933a
#: ../src/Doc/c-api/arg.rst:404
msgid ""
"The call to :c:func:`PyArg_UnpackTuple` in this example is entirely "
"equivalent to this call to :c:func:`PyArg_ParseTuple`::"
msgstr ""
# e222fb111287456b92598542681377bc
#: ../src/Doc/c-api/arg.rst:418
msgid ""
"Create a new value based on a format string similar to those accepted by "
"the :c:func:`PyArg_Parse\\*` family of functions and a sequence of values. "
"Returns the value or *NULL* in the case of an error; an exception will be "
"raised if *NULL* is returned."
msgstr ""
# b53bb204a68c4ca29f23772134dabaea
#: ../src/Doc/c-api/arg.rst:423
msgid ""
":c:func:`Py_BuildValue` does not always build a tuple. It builds a tuple "
"only if its format string contains two or more format units. If the format "
"string is empty, it returns ``None``; if it contains exactly one format "
"unit, it returns whatever object is described by that format unit. To force "
"it to return a tuple of size 0 or one, parenthesize the format string."
msgstr ""
# 6d6c3c2d51b7495c9e99a498ff27214a
#: ../src/Doc/c-api/arg.rst:430
msgid ""
"When memory buffers are passed as parameters to supply data to build "
"objects, as for the ``s`` and ``s#`` formats, the required data is copied. "
"Buffers provided by the caller are never referenced by the objects created "
"by :c:func:`Py_BuildValue`. In other words, if your code invokes :c:func:"
"`malloc` and passes the allocated memory to :c:func:`Py_BuildValue`, your "
"code is responsible for calling :c:func:`free` for that memory once :c:func:"
"`Py_BuildValue` returns."
msgstr ""
# d84964bae02e45a2926905fc407b91c7
#: ../src/Doc/c-api/arg.rst:438
msgid ""
"In the following description, the quoted form is the format unit; the entry "
"in (round) parentheses is the Python object type that the format unit will "
"return; and the entry in [square] brackets is the type of the C value(s) to "
"be passed."
msgstr ""
# 86e66e9ada6944e6b1f3ba0e731146b5
#: ../src/Doc/c-api/arg.rst:443
msgid ""
"The characters space, tab, colon and comma are ignored in format strings "
"(but not within format units such as ``s#``). This can be used to make long "
"format strings a tad more readable."
msgstr ""
# 3ff1209b196145d9b2e374846f7ef22b
#: ../src/Doc/c-api/arg.rst:448
msgid "``s`` (string) [char \\*]"
msgstr ""
# 2d70ed1d2bab424aa6a860dbc1ee4681
#: ../src/Doc/c-api/arg.rst:448
msgid ""
"Convert a null-terminated C string to a Python object. If the C string "
"pointer is *NULL*, ``None`` is used."
msgstr ""
# 6c8b8174197e40bfb6466484ebecf6cb
#: ../src/Doc/c-api/arg.rst:452
msgid "``s#`` (string) [char \\*, int]"
msgstr ""
# 00fc1fdc236a4696a2c97c0127e85db2
#: ../src/Doc/c-api/arg.rst:452
msgid ""
"Convert a C string and its length to a Python object. If the C string "
"pointer is *NULL*, the length is ignored and ``None`` is returned."
msgstr ""
# a8362b11d1374d61ae8c247502542da6
#: ../src/Doc/c-api/arg.rst:455
msgid "``z`` (string or ``None``) [char \\*]"
msgstr ""
# 9fd457e48a5743c0a4310b9d435869ed
#: ../src/Doc/c-api/arg.rst:456
msgid "Same as ``s``."
msgstr ""
# 3709eb3820e945f396069dd5194a2225
#: ../src/Doc/c-api/arg.rst:458
msgid "``z#`` (string or ``None``) [char \\*, int]"
msgstr ""
# 1afa18111a644ae6974962a73a9d8c3c
#: ../src/Doc/c-api/arg.rst:459
msgid "Same as ``s#``."
msgstr ""
# ea864c3ea6504f05b4ee13bffea15908
#: ../src/Doc/c-api/arg.rst:463
msgid "``u`` (Unicode string) [Py_UNICODE \\*]"
msgstr ""
# 37b1f67090f04d18986732a501c487f7
#: ../src/Doc/c-api/arg.rst:462
msgid ""
"Convert a null-terminated buffer of Unicode (UCS-2 or UCS-4) data to a "
"Python Unicode object. If the Unicode buffer pointer is *NULL*, ``None`` is "
"returned."
msgstr ""
# d7c8046b41774216a04d1a30a92cdaaf
#: ../src/Doc/c-api/arg.rst:468
msgid "``u#`` (Unicode string) [Py_UNICODE \\*, int]"
msgstr ""
# 9780c1261d0a484ba91c6b41377fba9c
#: ../src/Doc/c-api/arg.rst:467
msgid ""
"Convert a Unicode (UCS-2 or UCS-4) data buffer and its length to a Python "
"Unicode object. If the Unicode buffer pointer is *NULL*, the length is "
"ignored and ``None`` is returned."
msgstr ""
# 8ea20cbea40f445489b6c429b44779a9
#: ../src/Doc/c-api/arg.rst:472
msgid "Convert a plain C :c:type:`int` to a Python integer object."
msgstr ""
# a6ddbe672fa44888b4f0a9777e41838f
#: ../src/Doc/c-api/arg.rst:474
msgid "``b`` (integer) [char]"
msgstr ""
# 1721f80a75d54abe965d8e7c199b3aaa
#: ../src/Doc/c-api/arg.rst:475
msgid "Convert a plain C :c:type:`char` to a Python integer object."
msgstr ""
# 5e3170a4458a43eb8fac71fc6659be44
#: ../src/Doc/c-api/arg.rst:478
msgid "Convert a plain C :c:type:`short int` to a Python integer object."
msgstr ""
# f7926bc1d06d44bb9b9bbdec4e9c615f
#: ../src/Doc/c-api/arg.rst:481
msgid "Convert a C :c:type:`long int` to a Python integer object."
msgstr ""
# 68ff3980c65f4a5aa3ac8f1eb352b65a
#: ../src/Doc/c-api/arg.rst:484
msgid "Convert a C :c:type:`unsigned char` to a Python integer object."
msgstr ""
#: ../src/Doc/c-api/arg.rst:487
#, fuzzy
msgid "Convert a C :c:type:`unsigned short int` to a Python integer object."
msgstr ""
"Convertit un entier Python en un C :ctype:`unsigned short int`, sans "
"contrôle de débordement."
# aac9a6792fda471fae299cf60c1d1fb9
#: ../src/Doc/c-api/arg.rst:490
msgid "``I`` (integer/long) [unsigned int]"
msgstr ""
# c2293c3a587349b2b201a77e6fcc56ec
#: ../src/Doc/c-api/arg.rst:490
msgid ""
"Convert a C :c:type:`unsigned int` to a Python integer object or a Python "
"long integer object, if it is larger than ``sys.maxint``."
msgstr ""
# fbfca71dc52c475d89aece7d04f340e0
#: ../src/Doc/c-api/arg.rst:494
msgid "``k`` (integer/long) [unsigned long]"
msgstr ""
# f11ae35e1ebc427ab246df4100fd5e43
#: ../src/Doc/c-api/arg.rst:494
msgid ""
"Convert a C :c:type:`unsigned long` to a Python integer object or a Python "
"long integer object, if it is larger than ``sys.maxint``."
msgstr ""
# b8d615f71a4f46d7aed5b9715a4a1a81
#: ../src/Doc/c-api/arg.rst:498
msgid "``L`` (long) [PY_LONG_LONG]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:498
#, fuzzy
msgid ""
"Convert a C :c:type:`long long` to a Python long integer object. Only "
"available on platforms that support :c:type:`long long`."
msgstr ""
"Convertit un entier Python en un type C :ctype:`long long`. Ce format est "
"uniquement disponible sur les plates-formes qui prennent en charge :ctype:"
"`long long` (ou :ctype:`_int64` sous Windows)."
# 31a59f43b5d24ce59b60b076423b168f
#: ../src/Doc/c-api/arg.rst:502
msgid "``K`` (long) [unsigned PY_LONG_LONG]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:502
#, fuzzy
msgid ""
"Convert a C :c:type:`unsigned long long` to a Python long integer object. "
"Only available on platforms that support :c:type:`unsigned long long`."
msgstr ""
"Convertit un entier Python en un type C :ctype:`unsigned long long` sans en "
"vérifier le débordement. Ce format est uniquement disponible sur les plates-"
"formes qui prennent en charge :ctype:`unsigned long long` (ou :ctype:"
"`unsigned _int64` sous Windows)."
# 65f498e545d24fb7ba18e87664c7d2df
#: ../src/Doc/c-api/arg.rst:507
msgid "``n`` (int) [Py_ssize_t]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:506
#, fuzzy
msgid "Convert a C :c:type:`Py_ssize_t` to a Python integer or long integer."
msgstr "Convertit un entier Python en un type :ctype:`long int`."
# 795712ab0f0a4243b5882acdedf2cbbc
#: ../src/Doc/c-api/arg.rst:511
msgid ""
"Convert a C :c:type:`int` representing a character to a Python string of "
"length 1."
msgstr ""
#: ../src/Doc/c-api/arg.rst:515
#, fuzzy
msgid "Convert a C :c:type:`double` to a Python floating point number."
msgstr "Convertit un nombre flottant Python vers un type C :ctype:`float`."
# 40c39c925dcd43ffa89d1e533cb92aba
#: ../src/Doc/c-api/arg.rst:518
msgid "Same as ``d``."
msgstr ""
# e4d71aa6eb8b4d3884c0f5e5ef6315c2
#: ../src/Doc/c-api/arg.rst:520
msgid "``D`` (complex) [Py_complex \\*]"
msgstr ""
#: ../src/Doc/c-api/arg.rst:521
#, fuzzy
msgid "Convert a C :c:type:`Py_complex` structure to a Python complex number."
msgstr ""
"Convertit un nombre complexe Python vers une structure C :ctype:`Py_complex`."
# e687e49493d349738b5ed07099e55f8f
#: ../src/Doc/c-api/arg.rst:524
msgid ""
"Pass a Python object untouched (except for its reference count, which is "
"incremented by one). If the object passed in is a *NULL* pointer, it is "
"assumed that this was caused because the call producing the argument found "
"an error and set an exception. Therefore, :c:func:`Py_BuildValue` will "
"return *NULL* but won't raise an exception. If no exception has been raised "
"yet, :exc:`SystemError` is set."
msgstr ""
# 1acdc439fe644c51baa404e11bc588ab
#: ../src/Doc/c-api/arg.rst:531
msgid "``S`` (object) [PyObject \\*]"
msgstr ""
# 4f2699210d3549ca8f99d85372897683
#: ../src/Doc/c-api/arg.rst:532
msgid "Same as ``O``."
msgstr ""
# 7562e29f5a0a417a8267120100292e11
#: ../src/Doc/c-api/arg.rst:536
msgid "``N`` (object) [PyObject \\*]"
msgstr ""
# e71bb1d2e3cf4ab19ee20610b0921d77
#: ../src/Doc/c-api/arg.rst:535
msgid ""
"Same as ``O``, except it doesn't increment the reference count on the "
"object. Useful when the object is created by a call to an object "
"constructor in the argument list."
msgstr ""
# f6f2b3b594044f1aaf2bc99f90841176
#: ../src/Doc/c-api/arg.rst:540
msgid ""
"Convert *anything* to a Python object through a *converter* function. The "
"function is called with *anything* (which should be compatible with :c:type:"
"`void \\*`) as its argument and should return a \"new\" Python object, or "
"*NULL* if an error occurred."
msgstr ""
# 7e5428c9ec0b4a9ea50b29299721ec07
#: ../src/Doc/c-api/arg.rst:546
msgid ""
"Convert a sequence of C values to a Python tuple with the same number of "
"items."
msgstr ""
# 6c405dd99fa24175b5c67ae49c62ad40
#: ../src/Doc/c-api/arg.rst:550
msgid "``[items]`` (list) [*matching-items*]"
msgstr ""
# 12d80ac5c3184fd994f6f711d98934ba
#: ../src/Doc/c-api/arg.rst:550
msgid ""
"Convert a sequence of C values to a Python list with the same number of "
"items."
msgstr ""
# acc3e7d3258b4ca4b801f6550fd94f2b
#: ../src/Doc/c-api/arg.rst:555
msgid "``{items}`` (dictionary) [*matching-items*]"
msgstr ""
# f292bfb2366c43afb96553561173a60d
#: ../src/Doc/c-api/arg.rst:554
msgid ""
"Convert a sequence of C values to a Python dictionary. Each pair of "
"consecutive C values adds one item to the dictionary, serving as key and "
"value, respectively."
msgstr ""
# 83229eda42e44beb8ef5bc9cd5d01e81
#: ../src/Doc/c-api/arg.rst:558
msgid ""
"If there is an error in the format string, the :exc:`SystemError` exception "
"is set and *NULL* returned."
msgstr ""
# 02e1bbd2381b4e6790b698c3050e18e3
#: ../src/Doc/c-api/arg.rst:563
msgid ""
"Identical to :c:func:`Py_BuildValue`, except that it accepts a va_list "
"rather than a variable number of arguments."
msgstr ""
#: ../src/Doc/c-api/bool.rst:6
msgid "Boolean Objects"
msgstr "Les objets booléens"
#: ../src/Doc/c-api/bool.rst:8
msgid ""
"Booleans in Python are implemented as a subclass of integers. There are "
"only two booleans, :const:`Py_False` and :const:`Py_True`. As such, the "
"normal creation and deletion functions don't apply to booleans. The "
"following macros are available, however."
msgstr ""
"Les booléens en Python sont implémentés comme une classe dérivée des "
"entiers. Il y a seulement deux booléens, :const:`Py_False` et :const:"
"`Py_True`. Comme tel, les fonctions de création de suppression ne "
"s'appliquent pas aux booléens. Toutefois, les macros suivantes sont "
"disponibles."
# 7eecc4139f404bb4ab5dbbd0404f96f3
#: ../src/Doc/c-api/bool.rst:16
msgid "Return true if *o* is of type :c:data:`PyBool_Type`."
msgstr ""
# b1392abc005a4ee1b96a038f4766414a
#: ../src/Doc/c-api/bool.rst:23
msgid ""
"The Python ``False`` object. This object has no methods. It needs to be "
"treated just like any other object with respect to reference counts."
msgstr ""
# a541254e5fcd420581ae9b736842be75
#: ../src/Doc/c-api/bool.rst:29
msgid ""
"The Python ``True`` object. This object has no methods. It needs to be "
"treated just like any other object with respect to reference counts."
msgstr ""
# 37a8e1538dc34de8987b6868b110e07b
#: ../src/Doc/c-api/bool.rst:35
msgid ""
"Return :const:`Py_False` from a function, properly incrementing its "
"reference count."
msgstr ""
# 4220605a144344d28e7434867c49675a
#: ../src/Doc/c-api/bool.rst:43
msgid ""
"Return :const:`Py_True` from a function, properly incrementing its reference "
"count."
msgstr ""
# 064a3eb1aa9d495caa5b06d7ba135bac
#: ../src/Doc/c-api/bool.rst:51
msgid ""
"Return a new reference to :const:`Py_True` or :const:`Py_False` depending on "
"the truth value of *v*."
msgstr ""
#: ../src/Doc/c-api/buffer.rst:6
#, fuzzy
msgid "Buffers and Memoryview Objects"
msgstr "Objets de type MemoryView"
#: ../src/Doc/c-api/buffer.rst:16
#, fuzzy
msgid ""
"Python objects implemented in C can export a group of functions called the "
"\"buffer interface.\" These functions can be used by an object to expose "
"its data in a raw, byte-oriented format. Clients of the object can use the "
"buffer interface to access the object data directly, without needing to copy "
"it first."
msgstr ""
"Les objets Python implémentés en C peuvent exporter une \"interface sur des "
"tampons\". Ces fonctions peuvent être utilisées par un objets pour rendre "
"publiques ses données, dans un format brut orienté octets. Les clients de "
"ces objets peuvent utiliser l'interface sur les tampons pour accéder "
"directement aux données de l'objet, sans nécessiter une copie préalable."
#: ../src/Doc/c-api/buffer.rst:22
#, fuzzy
msgid ""
"Two examples of objects that support the buffer interface are strings and "
"arrays. The string object exposes the character contents in the buffer "
"interface's byte-oriented form. An array can only expose its contents via "
"the old-style buffer interface. This limitation does not apply to Python 3, "
"where :class:`memoryview` objects can be constructed from arrays, too. Array "
"elements may be multi-byte values."
msgstr ""
"Deux exemples d'objets qui supportent l'interfaces sur les tampons sont les "
"octets et les tableaux. Les objets octets exposent leur contenu en tant que "
"caractètres, dans une interface sur tampon orientée octets. Un tableau peut "
"également exposer son contenu, mais il doit être remarqué que les éléments "
"du tableau peuvent être des valeurs multi-octets."
#: ../src/Doc/c-api/buffer.rst:29
#, fuzzy
msgid ""
"An example user of the buffer interface is the file object's :meth:`write` "
"method. Any object that can export a series of bytes through the buffer "
"interface can be written to a file. There are a number of format codes to :c:"
"func:`PyArg_ParseTuple` that operate against an object's buffer interface, "
"returning data from the target object."
msgstr ""
"Un exemple d'utilisation de l'interface sur les tampons est la méthode :meth:"
"`write` de l'objet fichier. Tout objet qui peut exporter une série d'octets "
"en utilisant l'interface tampons peut être écrit dans un fichier. Il y a un "
"nombre de codes de format pour :cfunc:`PyArg_ParseTuple` qui contredisent "
"l'interface tampon de l'objet, en retournant les données de l'objet cible."
# 0c5afa5680604590aad7866d539629a5
#: ../src/Doc/c-api/buffer.rst:35
msgid ""
"Starting from version 1.6, Python has been providing Python-level buffer "
"objects and a C-level buffer API so that any built-in or used-defined type "
"can expose its characteristics. Both, however, have been deprecated because "
"of various shortcomings, and have been officially removed in Python 3 in "
"favour of a new C-level buffer API and a new Python-level object named :"
"class:`memoryview`."
msgstr ""
# e057b41fa5e44c42b136d8af81052eb1
#: ../src/Doc/c-api/buffer.rst:42
msgid ""
"The new buffer API has been backported to Python 2.6, and the :class:"
"`memoryview` object has been backported to Python 2.7. It is strongly "
"advised to use them rather than the old APIs, unless you are blocked from "
"doing so for compatibility reasons."
msgstr ""
# ce80a72b2cfc487f93017794efd310f6
#: ../src/Doc/c-api/buffer.rst:49
msgid "The new-style Py_buffer struct"
msgstr ""
# 83097360e75b435e85ac579f59791469
#: ../src/Doc/c-api/buffer.rst:56
msgid "A pointer to the start of the memory for the object."
msgstr ""
# b54a3cdb08434c8d8a06100b276d8860
#: ../src/Doc/c-api/buffer.rst:61
msgid "The total length of the memory in bytes."
msgstr ""
# 4e924243c7d044c7a00211c2166abb4d
#: ../src/Doc/c-api/buffer.rst:65
msgid "An indicator of whether the buffer is read only."
msgstr ""
# 3fbf60c911154e8894b35857766d22e2
#: ../src/Doc/c-api/buffer.rst:70
msgid ""
"A *NULL* terminated string in :mod:`struct` module style syntax giving the "
"contents of the elements available through the buffer. If this is *NULL*, ``"
"\"B\"`` (unsigned bytes) is assumed."
msgstr ""
# 838187362040442ab4ee0769301ea412
#: ../src/Doc/c-api/buffer.rst:76
msgid ""
"The number of dimensions the memory represents as a multi-dimensional "
"array. If it is 0, :c:data:`strides` and :c:data:`suboffsets` must be "
"*NULL*."
msgstr ""
# 0cddaa36ffea43628af5a1541cf1d6fc
#: ../src/Doc/c-api/buffer.rst:82
msgid ""
"An array of :c:type:`Py_ssize_t`\\s the length of :c:data:`ndim` giving the "
"shape of the memory as a multi-dimensional array. Note that ``((*shape)[0] "
"* ... * (*shape)[ndims-1])*itemsize`` should be equal to :c:data:`len`."
msgstr ""
# cdf90a87c7994b43be4bf5430dd8e324
#: ../src/Doc/c-api/buffer.rst:89
msgid ""
"An array of :c:type:`Py_ssize_t`\\s the length of :c:data:`ndim` giving the "
"number of bytes to skip to get to a new element in each dimension."
msgstr ""
# 575a94161c1148efaacb767b5e632fcb
#: ../src/Doc/c-api/buffer.rst:94
msgid ""
"An array of :c:type:`Py_ssize_t`\\s the length of :c:data:`ndim`. If these "
"suboffset numbers are greater than or equal to 0, then the value stored "
"along the indicated dimension is a pointer and the suboffset value dictates "
"how many bytes to add to the pointer after de-referencing. A suboffset value "
"that it negative indicates that no de-referencing should occur (striding in "
"a contiguous memory block)."
msgstr ""
# 2684c4272930409e99bf488695024eb0
#: ../src/Doc/c-api/buffer.rst:101
msgid ""
"Here is a function that returns a pointer to the element in an N-D array "
"pointed to by an N-dimesional index when there are both non-NULL strides and "
"suboffsets::"
msgstr ""
# d63a473e84914810b47c28fe15fc48b6
#: ../src/Doc/c-api/buffer.rst:121
msgid ""
"This is a storage for the itemsize (in bytes) of each element of the shared "
"memory. It is technically un-necessary as it can be obtained using :c:func:"
"`PyBuffer_SizeFromFormat`, however an exporter may know this information "
"without parsing the format string and it is necessary to know the itemsize "
"for proper interpretation of striding. Therefore, storing it is more "
"convenient and faster."
msgstr ""
# 04681b1ea2124d508e0b16cac84381ae
#: ../src/Doc/c-api/buffer.rst:130
msgid ""
"This is for use internally by the exporting object. For example, this might "
"be re-cast as an integer by the exporter and used to store flags about "
"whether or not the shape, strides, and suboffsets arrays must be freed when "
"the buffer is released. The consumer should never alter this value."
msgstr ""
#: ../src/Doc/c-api/buffer.rst:138
msgid "Buffer related functions"
msgstr "Fonctions relatives aux tampons"
# 1bea0f2f621a401fbc2da256d8664c90
#: ../src/Doc/c-api/buffer.rst:143
msgid "Return 1 if *obj* supports the buffer interface otherwise 0."
msgstr ""
# 2b5281ff37d5413fa58df835c6d75db0
#: ../src/Doc/c-api/buffer.rst:148
msgid ""
"Export *obj* into a :c:type:`Py_buffer`, *view*. These arguments must never "
"be *NULL*. The *flags* argument is a bit field indicating what kind of "
"buffer the caller is prepared to deal with and therefore what kind of buffer "
"the exporter is allowed to return. The buffer interface allows for "
"complicated memory sharing possibilities, but some caller may not be able to "
"handle all the complexity but may want to see if the exporter will let them "
"take a simpler view to its memory."
msgstr ""
# eb4076fdeae34400bfa56014427c29a5
#: ../src/Doc/c-api/buffer.rst:156
msgid ""
"Some exporters may not be able to share memory in every possible way and may "
"need to raise errors to signal to some consumers that something is just not "
"possible. These errors should be a :exc:`BufferError` unless there is "
"another error that is actually causing the problem. The exporter can use "
"flags information to simplify how much of the :c:data:`Py_buffer` structure "
"is filled in with non-default values and/or raise an error if the object "
"can't support a simpler view of its memory."
msgstr ""
# f31e0fe06b3544218bae2a5ccbd66608
#: ../src/Doc/c-api/buffer.rst:164
msgid "0 is returned on success and -1 on error."
msgstr ""
# b73cabc466dd4fc39a6b5cf9737b86da
#: ../src/Doc/c-api/buffer.rst:166
msgid "The following table gives possible values to the *flags* arguments."
msgstr ""
# 7d3506eb9b8844acafee7ba99112828f
#: ../src/Doc/c-api/buffer.rst:169
msgid "Flag"
msgstr ""
# e5e455e093564332a040ab0e2c24d082
#: ../src/Doc/c-api/buffer.rst:169
msgid "Description"
msgstr ""
# 564c45ab528f44818e85d070ffb82de7
#: ../src/Doc/c-api/buffer.rst:171
msgid ":c:macro:`PyBUF_SIMPLE`"
msgstr ""
# 9eb3717136054e61afb9648c406f4b5c
#: ../src/Doc/c-api/buffer.rst:171
msgid ""
"This is the default flag state. The returned buffer may or may not have "
"writable memory. The format of the data will be assumed to be unsigned "
"bytes. This is a \"stand-alone\" flag constant. It never needs to be '|'d "
"to the others. The exporter will raise an error if it cannot provide such a "
"contiguous buffer of bytes."
msgstr ""
# c0b3c1f1d6bc4b699dc855ba0682eeb9
#: ../src/Doc/c-api/buffer.rst:180
msgid ":c:macro:`PyBUF_WRITABLE`"
msgstr ""
# 3f9ca17b6bb64113bbe298c75fe72e79
#: ../src/Doc/c-api/buffer.rst:180
msgid ""
"The returned buffer must be writable. If it is not writable, then raise an "
"error."
msgstr ""
# 6ff1045f7f9541cba44da3a729d87634
#: ../src/Doc/c-api/buffer.rst:183
msgid ":c:macro:`PyBUF_STRIDES`"
msgstr ""
# 859d6ca98521458db13c1b50cd5eada8
#: ../src/Doc/c-api/buffer.rst:183
msgid ""
"This implies :c:macro:`PyBUF_ND`. The returned buffer must provide strides "
"information (i.e. the strides cannot be NULL). This would be used when the "
"consumer can handle strided, discontiguous arrays. Handling strides "
"automatically assumes you can handle shape. The exporter can raise an error "
"if a strided representation of the data is not possible (i.e. without the "
"suboffsets)."
msgstr ""
# 713e91af240b413895ff45a30035a060
#: ../src/Doc/c-api/buffer.rst:193
msgid ":c:macro:`PyBUF_ND`"
msgstr ""
# 783aa64cdc6342c89113e77a329eb6cb
#: ../src/Doc/c-api/buffer.rst:193
msgid ""
"The returned buffer must provide shape information. The memory will be "
"assumed C-style contiguous (last dimension varies the fastest). The exporter "
"may raise an error if it cannot provide this kind of contiguous buffer. If "
"this is not given then shape will be *NULL*."
msgstr ""
# 597623de5ee446a9a9767cea888e75e9
#: ../src/Doc/c-api/buffer.rst:203
msgid ""
":c:macro:`PyBUF_C_CONTIGUOUS` :c:macro:`PyBUF_F_CONTIGUOUS` :c:macro:"
"`PyBUF_ANY_CONTIGUOUS`"
msgstr ""
# 657075ebe6d24b869c7a1c28a517f54f
#: ../src/Doc/c-api/buffer.rst:203
msgid ""
"These flags indicate that the contiguity returned buffer must be "
"respectively, C-contiguous (last dimension varies the fastest), Fortran "
"contiguous (first dimension varies the fastest) or either one. All of these "
"flags imply :c:macro:`PyBUF_STRIDES` and guarantee that the strides buffer "
"info structure will be filled in correctly."
msgstr ""
# 2a27c0c78917485e974a6934d77da59e
#: ../src/Doc/c-api/buffer.rst:213
msgid ":c:macro:`PyBUF_INDIRECT`"
msgstr ""
# 874cd7e54dfc4851aed475319cdfb86d
#: ../src/Doc/c-api/buffer.rst:213
msgid ""
"This flag indicates the returned buffer must have suboffsets information "
"(which can be NULL if no suboffsets are needed). This can be used when the "
"consumer can handle indirect array referencing implied by these suboffsets. "
"This implies :c:macro:`PyBUF_STRIDES`."
msgstr ""
# 825a3156759040f28465575167328270
#: ../src/Doc/c-api/buffer.rst:223
msgid ":c:macro:`PyBUF_FORMAT`"
msgstr ""
# 7700024495fc415fbf4c9822929a3788
#: ../src/Doc/c-api/buffer.rst:223
msgid ""
"The returned buffer must have true format information if this flag is "
"provided. This would be used when the consumer is going to be checking for "
"what 'kind' of data is actually stored. An exporter should always be able to "
"provide this information if requested. If format is not explicitly requested "
"then the format must be returned as *NULL* (which means ``'B'``, or unsigned "
"bytes)"
msgstr ""
# b38af5a366d84c0886641165e5dff7fe
#: ../src/Doc/c-api/buffer.rst:233
msgid ":c:macro:`PyBUF_STRIDED`"
msgstr ""
# 897e2e5edccd4db1a70c98d7df692661
#: ../src/Doc/c-api/buffer.rst:233
msgid "This is equivalent to ``(PyBUF_STRIDES | PyBUF_WRITABLE)``."
msgstr ""
# 87f7ca79b01649108983439d9b5867e2
#: ../src/Doc/c-api/buffer.rst:236
msgid ":c:macro:`PyBUF_STRIDED_RO`"
msgstr ""
# ccaad422dcef4e8190c57f4e2bbb148f
#: ../src/Doc/c-api/buffer.rst:236
msgid "This is equivalent to ``(PyBUF_STRIDES)``."
msgstr ""
# 3cd2b3f4e8384baca7e52c52cec603fd
#: ../src/Doc/c-api/buffer.rst:239
msgid ":c:macro:`PyBUF_RECORDS`"
msgstr ""
# 624130abadb34453bb7b097b7adffa49
#: ../src/Doc/c-api/buffer.rst:239
msgid ""
"This is equivalent to ``(PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)``."
msgstr ""
# ca8f54fd1da544518bc71d830aa8504f
#: ../src/Doc/c-api/buffer.rst:242
msgid ":c:macro:`PyBUF_RECORDS_RO`"
msgstr ""
# ef3a267bff5d4706a9e2a335fc3475e8
#: ../src/Doc/c-api/buffer.rst:242
msgid "This is equivalent to ``(PyBUF_STRIDES | PyBUF_FORMAT)``."
msgstr ""
# 000547c903914e8ca2d871d01acb6887
#: ../src/Doc/c-api/buffer.rst:245
msgid ":c:macro:`PyBUF_FULL`"
msgstr ""
# 79e95a57b06d4e0bb45eb4b58dd8481d
#: ../src/Doc/c-api/buffer.rst:245
msgid ""
"This is equivalent to ``(PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)``."
msgstr ""
# 34acb5bf30d9483fa704af247bcdbd51
#: ../src/Doc/c-api/buffer.rst:248
msgid ":c:macro:`PyBUF_FULL_RO`"
msgstr ""
# 57b4070dee194bde9b87713fcab99cde
#: ../src/Doc/c-api/buffer.rst:248
msgid "This is equivalent to ``(PyBUF_INDIRECT | PyBUF_FORMAT)``."
msgstr ""
# 36f4032bc0864a2cb6c7ba139df5784b
#: ../src/Doc/c-api/buffer.rst:251
msgid ":c:macro:`PyBUF_CONTIG`"
msgstr ""
# a56c268931f347538baac9194097d042
#: ../src/Doc/c-api/buffer.rst:251
msgid "This is equivalent to ``(PyBUF_ND | PyBUF_WRITABLE)``."
msgstr ""
# 99f4c318fff94af3aa6d25379be38426
#: ../src/Doc/c-api/buffer.rst:254
msgid ":c:macro:`PyBUF_CONTIG_RO`"
msgstr ""
# 18017f9087b148ceb5ed3134d679bc59
#: ../src/Doc/c-api/buffer.rst:254
msgid "This is equivalent to ``(PyBUF_ND)``."
msgstr ""
# 0a6410eb1d4d425aa1b62b1c174770de
#: ../src/Doc/c-api/buffer.rst:261
msgid ""
"Release the buffer *view*. This should be called when the buffer is no "
"longer being used as it may free memory from it."
msgstr ""
# 4267617ed0144f1fb8423b696878e630
#: ../src/Doc/c-api/buffer.rst:267
msgid ""
"Return the implied :c:data:`~Py_buffer.itemsize` from the struct-stype :c:"
"data:`~Py_buffer.format`."
msgstr ""
# 7060ddace37140b48df4ef3461a239bf
#: ../src/Doc/c-api/buffer.rst:273
msgid ""
"Return 1 if the memory defined by the *view* is C-style (*fortran* is "
"``'C'``) or Fortran-style (*fortran* is ``'F'``) contiguous or either one "
"(*fortran* is ``'A'``). Return 0 otherwise."
msgstr ""
# aba16917b1fd4724a2521a5e0820a067
#: ../src/Doc/c-api/buffer.rst:280
msgid ""
"Fill the *strides* array with byte-strides of a contiguous (C-style if "
"*fortran* is ``'C'`` or Fortran-style if *fortran* is ``'F'``) array of the "
"given shape with the given number of bytes per element."
msgstr ""
# 31084c6ff76b47df97270e2e0ed7e187
#: ../src/Doc/c-api/buffer.rst:287
msgid ""
"Fill in a buffer-info structure, *view*, correctly for an exporter that can "
"only share a contiguous chunk of memory of \"unsigned bytes\" of the given "
"length. Return 0 on success and -1 (with raising an error) on error."
msgstr ""
#: ../src/Doc/c-api/buffer.rst:293
msgid "MemoryView objects"
msgstr "Objets de type MemoryView"
#: ../src/Doc/c-api/buffer.rst:297
#, fuzzy
msgid ""
"A :class:`memoryview` object exposes the new C level buffer interface as a "
"Python object which can then be passed around like any other object."
msgstr "Un objet MemoryView expose l'interface tampon au niveau C à Python."
#: ../src/Doc/c-api/buffer.rst:302
#, fuzzy
msgid ""
"Create a memoryview object from an object that defines the new buffer "
"interface."
msgstr "Un objet MemoryView expose l'interface tampon au niveau C à Python."
# 414c75e9fa67453791ae3911767897df
#: ../src/Doc/c-api/buffer.rst:308
msgid ""
"Create a memoryview object wrapping the given buffer-info structure *view*. "
"The memoryview object then owns the buffer, which means you shouldn't try to "
"release it yourself: it will be released on deallocation of the memoryview "
"object."
msgstr ""
# dcfeedb8e24e4d528cf048eb20375d8f
#: ../src/Doc/c-api/buffer.rst:316
msgid ""
"Create a memoryview object to a contiguous chunk of memory (in either 'C' or "
"'F'ortran *order*) from an object that defines the buffer interface. If "
"memory is contiguous, the memoryview object points to the original memory. "
"Otherwise copy is made and the memoryview points to a new bytes object."
msgstr ""
# 6e8da4f1066a4023a5f9e5e371590228
#: ../src/Doc/c-api/buffer.rst:325
msgid ""
"Return true if the object *obj* is a memoryview object. It is not currently "
"allowed to create subclasses of :class:`memoryview`."
msgstr ""
# 6e7df2c26e404a6ea601bf77e643fa50
#: ../src/Doc/c-api/buffer.rst:331
msgid ""
"Return a pointer to the buffer-info structure wrapped by the given object. "
"The object **must** be a memoryview instance; this macro doesn't check its "
"type, you must do it yourself or you will risk crashes."
msgstr ""
#: ../src/Doc/c-api/buffer.rst:337
#, fuzzy
msgid "Old-style buffer objects"
msgstr "Autres objets"
#: ../src/Doc/c-api/buffer.rst:341
#, fuzzy
msgid ""
"More information on the old buffer interface is provided in the section :ref:"
"`buffer-structs`, under the description for :c:type:`PyBufferProcs`."
msgstr ""
"Plus d'informations sur l'interface sur les tampons sont données dans la "
"section :ref:`buffer-structs`, dans la description sur :ctype:"
"`PyBufferProcs`."
# c9eefd8cce0745c7ad1c32c0cb581ce4
#: ../src/Doc/c-api/buffer.rst:344
msgid ""
"A \"buffer object\" is defined in the :file:`bufferobject.h` header "
"(included by :file:`Python.h`). These objects look very similar to string "
"objects at the Python programming level: they support slicing, indexing, "
"concatenation, and some other standard string operations. However, their "
"data can come from one of two sources: from a block of memory, or from "
"another object which exports the buffer interface."
msgstr ""
#: ../src/Doc/c-api/buffer.rst:351
#, fuzzy
msgid ""
"Buffer objects are useful as a way to expose the data from another object's "
"buffer interface to the Python programmer. They can also be used as a zero-"
"copy slicing mechanism. Using their ability to reference a block of memory, "
"it is possible to expose any data to the Python programmer quite easily. The "
"memory could be a large, constant array in a C extension, it could be a raw "
"block of memory for manipulation before passing to an operating system "
"library, or it could be used to pass around structured data in its native, "
"in-memory format."
msgstr ""
"Les objets tampons sont utiles pour exposer les données d'une autre "
"interface d'un objet tampon au développeur Python. Ils peuvent aussi être "
"utilisés comme un mécanisme de découpage sans copie. En utilisant leur "
"capacité à référencer un bloc de mémoire, il est possible d'exposer "
"n'importe quelle donnée au développeur Python assez simplement. La mémoire "
"peut ainsi être un tableau constant de grande taille d'une extension en C, "
"elle peut être un bloc mémoire destiné à être modifié avant de le passer à "
"une librairie système, ou encore elle peut permettre de faire passer des "
"données structurées dans leur format originel en mémoire."
# 28c73b7f1fd543c1bc7229516c6cdaab
#: ../src/Doc/c-api/buffer.rst:363
msgid "This subtype of :c:type:`PyObject` represents a buffer object."
msgstr ""
# 1ae50d720b8a42599024b36773b9dafe
#: ../src/Doc/c-api/buffer.rst:370
msgid ""
"The instance of :c:type:`PyTypeObject` which represents the Python buffer "
"type; it is the same object as ``buffer`` and ``types.BufferType`` in the "
"Python layer. ."
msgstr ""
# 164fa632c813488c8ba1b240b8b75f6b
#: ../src/Doc/c-api/buffer.rst:377
msgid ""
"This constant may be passed as the *size* parameter to :c:func:"
"`PyBuffer_FromObject` or :c:func:`PyBuffer_FromReadWriteObject`. It "
"indicates that the new :c:type:`PyBufferObject` should refer to *base* "
"object from the specified *offset* to the end of its exported buffer. Using "
"this enables the caller to avoid querying the *base* object for its length."
msgstr ""
# 929e9c14e96745ab8b6d879dde6d041e
#: ../src/Doc/c-api/buffer.rst:387
msgid "Return true if the argument has type :c:data:`PyBuffer_Type`."
msgstr ""
# 4ac49c7321434709ab08bda3b9d515be
#: ../src/Doc/c-api/buffer.rst:392
msgid ""
"Return a new read-only buffer object. This raises :exc:`TypeError` if "
"*base* doesn't support the read-only buffer protocol or doesn't provide "
"exactly one buffer segment, or it raises :exc:`ValueError` if *offset* is "
"less than zero. The buffer will hold a reference to the *base* object, and "
"the buffer's contents will refer to the *base* object's buffer interface, "
"starting as position *offset* and extending for *size* bytes. If *size* is :"
"const:`Py_END_OF_BUFFER`, then the new buffer's contents extend to the "
"length of the *base* object's exported buffer data."
msgstr ""
# eede442b0d224e27b7cfb4bdc7e2e19b
#: ../src/Doc/c-api/buffer.rst:409
msgid ""
"Return a new writable buffer object. Parameters and exceptions are similar "
"to those for :c:func:`PyBuffer_FromObject`. If the *base* object does not "
"export the writeable buffer protocol, then :exc:`TypeError` is raised."
msgstr ""
# ad4f2ae694c9426a87ba14f5d6ab37f0
#: ../src/Doc/c-api/buffer.rst:421
msgid ""
"Return a new read-only buffer object that reads from a specified location in "
"memory, with a specified size. The caller is responsible for ensuring that "
"the memory buffer, passed in as *ptr*, is not deallocated while the returned "
"buffer object exists. Raises :exc:`ValueError` if *size* is less than "
"zero. Note that :const:`Py_END_OF_BUFFER` may *not* be passed for the "
"*size* parameter; :exc:`ValueError` will be raised in that case."
msgstr ""
# 92db21d5356f4876b911eeb7050c7a8b
#: ../src/Doc/c-api/buffer.rst:435
msgid ""
"Similar to :c:func:`PyBuffer_FromMemory`, but the returned buffer is "
"writable."
msgstr ""
# 3395092b4f1c42ef8c9fc558e7a17de2
#: ../src/Doc/c-api/buffer.rst:445
msgid ""
"Return a new writable buffer object that maintains its own memory buffer of "
"*size* bytes. :exc:`ValueError` is returned if *size* is not zero or "
"positive. Note that the memory buffer (as returned by :c:func:"
"`PyObject_AsWriteBuffer`) is not specifically aligned."
msgstr ""
#: ../src/Doc/c-api/bytearray.rst:6
msgid "Byte Array Objects"
msgstr "Objets Tableau d'Octets"
# cf239beefe7f48de9b3788b3ab350d06
#: ../src/Doc/c-api/bytearray.rst:15
msgid ""
"This subtype of :c:type:`PyObject` represents a Python bytearray object."
msgstr ""
# ae6cdcffa84b4a64b6584c95b4a6ffb9
#: ../src/Doc/c-api/bytearray.rst:20
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python bytearray "
"type; it is the same object as ``bytearray`` in the Python layer."
msgstr ""
#: ../src/Doc/c-api/bytearray.rst:24
msgid "Type check macros"
msgstr "Macros de vérification de type"
# 658e8b186c2a48be98cf88f02734f60e
#: ../src/Doc/c-api/bytearray.rst:28
msgid ""
"Return true if the object *o* is a bytearray object or an instance of a "
"subtype of the bytearray type."
msgstr ""
# c1df3fec28374e2fa6aa670f6f15d8cd
#: ../src/Doc/c-api/bytearray.rst:34
msgid ""
"Return true if the object *o* is a bytearray object, but not an instance of "
"a subtype of the bytearray type."
msgstr ""
#: ../src/Doc/c-api/bytearray.rst:39
msgid "Direct API functions"
msgstr "Fonctions directes sur l'API"
# ed13b2c68bbf4e0f801fa83f868ae1f2
#: ../src/Doc/c-api/bytearray.rst:43
msgid ""
"Return a new bytearray object from any object, *o*, that implements the "
"buffer protocol."
msgstr ""
# 0e6f3d8af033441f93de8621cead3051
#: ../src/Doc/c-api/bytearray.rst:51
msgid ""
"Create a new bytearray object from *string* and its length, *len*. On "
"failure, *NULL* is returned."
msgstr ""
# 5cfd041759c24ad3b6efc4733dc1d97c
#: ../src/Doc/c-api/bytearray.rst:57
msgid ""
"Concat bytearrays *a* and *b* and return a new bytearray with the result."
msgstr ""
# 26bbc9a54899462a9b59b008cfe5f45a
#: ../src/Doc/c-api/bytearray.rst:62
msgid "Return the size of *bytearray* after checking for a *NULL* pointer."
msgstr ""
# ea95b360692945408e6c1b3951de2022
#: ../src/Doc/c-api/bytearray.rst:67
msgid ""
"Return the contents of *bytearray* as a char array after checking for a "
"*NULL* pointer."
msgstr ""
# fdd2ceb18a914a8889147294a6d67c1c
#: ../src/Doc/c-api/bytearray.rst:73
msgid "Resize the internal buffer of *bytearray* to *len*."
msgstr ""
#: ../src/Doc/c-api/bytearray.rst:76
msgid "Macros"
msgstr "Macros"
#: ../src/Doc/c-api/bytearray.rst:78
msgid "These macros trade safety for speed and they don't check pointers."
msgstr ""
"Ces macros sont taillées pour la vitesse d'exécution et ne vérifient pas les "
"pointeurs."
# 96b0484439d742cd86cd5fddc8b74b48
#: ../src/Doc/c-api/bytearray.rst:82
msgid "Macro version of :c:func:`PyByteArray_AsString`."
msgstr ""
# d91cf3de6b0a4f08a056805c9c78d071
#: ../src/Doc/c-api/bytearray.rst:87
msgid "Macro version of :c:func:`PyByteArray_Size`."
msgstr ""
#: ../src/Doc/c-api/capsule.rst:6
msgid "Capsules"
msgstr "Capsules"
#: ../src/Doc/c-api/capsule.rst:10
msgid ""
"Refer to :ref:`using-capsules` for more information on using these objects."
msgstr ""
"Reportez-vous à :ref:`using-capsules` pour plus d'informations sur "
"l'utilisation de ces objets."
# 5a6ed2a79ba74f24a1283d4aa15489a9
# f4962d96603f479e8dc749540edba6b0
#: ../src/Doc/c-api/capsule.rst:15 ../src/Doc/c-api/cobject.rst:18
msgid ""
"This subtype of :c:type:`PyObject` represents an opaque value, useful for C "
"extension modules who need to pass an opaque value (as a :c:type:`void\\*` "
"pointer) through Python code to other C code. It is often used to make a C "
"function pointer defined in one module available to other modules, so the "
"regular import mechanism can be used to access C APIs defined in dynamically "
"loaded modules."
msgstr ""
# 7f745c6c039d48178614dec24b1e100e
#: ../src/Doc/c-api/capsule.rst:24
msgid "The type of a destructor callback for a capsule. Defined as::"
msgstr ""
# 57f37e0c192d49ae811c6774dad24383
#: ../src/Doc/c-api/capsule.rst:28
msgid ""
"See :c:func:`PyCapsule_New` for the semantics of PyCapsule_Destructor "
"callbacks."
msgstr ""
# 2d44ae55a31f413abbd8a8f30a142728
#: ../src/Doc/c-api/capsule.rst:34
msgid "Return true if its argument is a :c:type:`PyCapsule`."
msgstr ""
# 22d7282ef7bd4229990e582c39b9dbea
#: ../src/Doc/c-api/capsule.rst:39
msgid ""
"Create a :c:type:`PyCapsule` encapsulating the *pointer*. The *pointer* "
"argument may not be *NULL*."
msgstr ""
# 903f9f93755a40fea97eb37e640175d1
#: ../src/Doc/c-api/capsule.rst:42
msgid "On failure, set an exception and return *NULL*."
msgstr ""
# 15b0ed4843f040d9b57e18d354f52e83
#: ../src/Doc/c-api/capsule.rst:44
msgid ""
"The *name* string may either be *NULL* or a pointer to a valid C string. If "
"non-*NULL*, this string must outlive the capsule. (Though it is permitted "
"to free it inside the *destructor*.)"
msgstr ""
# 8fbf58ed210b4f6b8524745f428eb255
#: ../src/Doc/c-api/capsule.rst:48
msgid ""
"If the *destructor* argument is not *NULL*, it will be called with the "
"capsule as its argument when it is destroyed."
msgstr ""
# ea2311e7868947e98de7b51216ef1db2
#: ../src/Doc/c-api/capsule.rst:51
msgid ""
"If this capsule will be stored as an attribute of a module, the *name* "
"should be specified as ``modulename.attributename``. This will enable other "
"modules to import the capsule using :c:func:`PyCapsule_Import`."
msgstr ""
# a534a1f9123e49cabfffe57c675ff5eb
#: ../src/Doc/c-api/capsule.rst:58
msgid ""
"Retrieve the *pointer* stored in the capsule. On failure, set an exception "
"and return *NULL*."
msgstr ""
# bc84e55e45a9407e8969a6037b625595
#: ../src/Doc/c-api/capsule.rst:61
msgid ""
"The *name* parameter must compare exactly to the name stored in the capsule. "
"If the name stored in the capsule is *NULL*, the *name* passed in must also "
"be *NULL*. Python uses the C function :c:func:`strcmp` to compare capsule "
"names."
msgstr ""
# e5118c448ab94d6285a2427614ba186e
#: ../src/Doc/c-api/capsule.rst:69
msgid ""
"Return the current destructor stored in the capsule. On failure, set an "
"exception and return *NULL*."
msgstr ""
# ed34ff245a674db89bf4281723d55d65
#: ../src/Doc/c-api/capsule.rst:72
msgid ""
"It is legal for a capsule to have a *NULL* destructor. This makes a *NULL* "
"return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :c:func:"
"`PyErr_Occurred` to disambiguate."
msgstr ""
# 587b8622d19d4ca19c9dcc5849a10f1d
#: ../src/Doc/c-api/capsule.rst:79
msgid ""
"Return the current context stored in the capsule. On failure, set an "
"exception and return *NULL*."
msgstr ""
# 8073e0627bef4b60b43f1ae6c47ecb56
#: ../src/Doc/c-api/capsule.rst:82
msgid ""
"It is legal for a capsule to have a *NULL* context. This makes a *NULL* "
"return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :c:func:"
"`PyErr_Occurred` to disambiguate."
msgstr ""
# 4fe112f6c30f4463a95824b664207992
#: ../src/Doc/c-api/capsule.rst:89
msgid ""
"Return the current name stored in the capsule. On failure, set an exception "
"and return *NULL*."
msgstr ""
# 414007577f28426bb565e0a44e13a0d4
#: ../src/Doc/c-api/capsule.rst:92
msgid ""
"It is legal for a capsule to have a *NULL* name. This makes a *NULL* return "
"code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :c:func:"
"`PyErr_Occurred` to disambiguate."
msgstr ""
# 5ad46a54f7c14a39ba96a48fdefcf0ca
#: ../src/Doc/c-api/capsule.rst:99
msgid ""
"Import a pointer to a C object from a capsule attribute in a module. The "
"*name* parameter should specify the full name to the attribute, as in "
"``module.attribute``. The *name* stored in the capsule must match this "
"string exactly. If *no_block* is true, import the module without blocking "
"(using :c:func:`PyImport_ImportModuleNoBlock`). If *no_block* is false, "
"import the module conventionally (using :c:func:`PyImport_ImportModule`)."
msgstr ""
# 2c8e61b85e4b4eed867dd02bf2351b34
#: ../src/Doc/c-api/capsule.rst:106
msgid ""
"Return the capsule's internal *pointer* on success. On failure, set an "
"exception and return *NULL*. However, if :c:func:`PyCapsule_Import` failed "
"to import the module, and *no_block* was true, no exception is set."
msgstr ""
# 31bd9ff06fa945d9b4fa013589865f5d
#: ../src/Doc/c-api/capsule.rst:112
msgid ""
"Determines whether or not *capsule* is a valid capsule. A valid capsule is "
"non-*NULL*, passes :c:func:`PyCapsule_CheckExact`, has a non-*NULL* pointer "
"stored in it, and its internal name matches the *name* parameter. (See :c:"
"func:`PyCapsule_GetPointer` for information on how capsule names are "
"compared.)"
msgstr ""
# 8f736c6076ff49a09724def81dcdaac0
#: ../src/Doc/c-api/capsule.rst:118
msgid ""
"In other words, if :c:func:`PyCapsule_IsValid` returns a true value, calls "
"to any of the accessors (any function starting with :c:func:`PyCapsule_Get`) "
"are guaranteed to succeed."
msgstr ""
# 76370b0d58394cf9a7a01027866e3a83
#: ../src/Doc/c-api/capsule.rst:122
msgid ""
"Return a nonzero value if the object is valid and matches the name passed "
"in. Return 0 otherwise. This function will not fail."
msgstr ""
# 54e1d944dedf41fea0a40d6e19aaafc2
#: ../src/Doc/c-api/capsule.rst:127
msgid "Set the context pointer inside *capsule* to *context*."
msgstr ""
# 89c2d2d9f5ce421a9c692caf08aa1ce9
# 7b5a6d00ead14c38b5c08f91ffaaf348
# 27c949909a8d46c5937cfcd31503c74c
# 20e340a98ca3498ca63971955d141506
#: ../src/Doc/c-api/capsule.rst:129 ../src/Doc/c-api/capsule.rst:135
#: ../src/Doc/c-api/capsule.rst:143 ../src/Doc/c-api/capsule.rst:150
msgid "Return 0 on success. Return nonzero and set an exception on failure."
msgstr ""
# d3586d86c8e843c88b9b09af52852140
#: ../src/Doc/c-api/capsule.rst:133
msgid "Set the destructor inside *capsule* to *destructor*."
msgstr ""
# b1e07fd60d3b499ca1fd6975a3137fec
#: ../src/Doc/c-api/capsule.rst:139
msgid ""
"Set the name inside *capsule* to *name*. If non-*NULL*, the name must "
"outlive the capsule. If the previous *name* stored in the capsule was not "
"*NULL*, no attempt is made to free it."
msgstr ""
# 255e6f798d1941f29d2540b03d0c151a
#: ../src/Doc/c-api/capsule.rst:147
msgid ""
"Set the void pointer inside *capsule* to *pointer*. The pointer may not be "
"*NULL*."
msgstr ""
#: ../src/Doc/c-api/cell.rst:6
msgid "Cell Objects"
msgstr "Objets Cellules"
#: ../src/Doc/c-api/cell.rst:8
msgid ""
"\"Cell\" objects are used to implement variables referenced by multiple "
"scopes. For each such variable, a cell object is created to store the value; "
"the local variables of each stack frame that references the value contains a "
"reference to the cells from outer scopes which also use that variable. When "
"the value is accessed, the value contained in the cell is used instead of "
"the cell object itself. This de-referencing of the cell object requires "
"support from the generated byte-code; these are not automatically de-"
"referenced when accessed. Cell objects are not likely to be useful elsewhere."
msgstr ""
"Les objets \"Cellules\" sont utilisés pour implémenter des variables "
"référencées dans de multiples enviromments. Pour chacune de ces variables, "
"un objet cellule est créé pour stocker sa valeur ; les variables locales de "
"chaque pile d'exécution qui référence cette valeur contiennent une référence "
"sur les cellules des autres environnements qui utilisent aussi cette "
"variable. Quand la valeur est accédée, la valeur de la cellule est utilisée, "
"au lei de celle de l'objet cellule proprement dit. Ce dé-référencement de "
"l'objet cellule requiert l'intervention du bytecode généré ; il n'est pas "
"automatiquement dé-référencé quand il est accédé. Il est plausible que les "
"objets cellules ne soit utilisés ailleurs."
# 07ddbeee521a471c902f2d8c88c1039a
#: ../src/Doc/c-api/cell.rst:20
msgid "The C structure used for cell objects."
msgstr ""
# c72b506402a64a3aa2e9c8ebe4eae08b
#: ../src/Doc/c-api/cell.rst:25
msgid "The type object corresponding to cell objects."
msgstr ""
# 4e64ab7810bc4498b3a872bfd84f463c
#: ../src/Doc/c-api/cell.rst:30
msgid "Return true if *ob* is a cell object; *ob* must not be *NULL*."
msgstr ""
# 15c2c44facc94addaf240ba9b066b797
#: ../src/Doc/c-api/cell.rst:35
msgid ""
"Create and return a new cell object containing the value *ob*. The parameter "
"may be *NULL*."
msgstr ""
# 5e2cdd4e80fc4da395b1f200fb5728dd
#: ../src/Doc/c-api/cell.rst:41
msgid "Return the contents of the cell *cell*."
msgstr ""
# 354010c659fd4c16a92c45f761483fb8
#: ../src/Doc/c-api/cell.rst:46
msgid ""
"Return the contents of the cell *cell*, but without checking that *cell* is "
"non-*NULL* and a cell object."
msgstr ""
# ae7945d8ddfc4581874b8219ad60b256
#: ../src/Doc/c-api/cell.rst:52
msgid ""
"Set the contents of the cell object *cell* to *value*. This releases the "
"reference to any current content of the cell. *value* may be *NULL*. *cell* "
"must be non-*NULL*; if it is not a cell object, ``-1`` will be returned. On "
"success, ``0`` will be returned."
msgstr ""
# a347a07614fc4bc8a287c8166fa804bd
#: ../src/Doc/c-api/cell.rst:60
msgid ""
"Sets the value of the cell object *cell* to *value*. No reference counts "
"are adjusted, and no checks are made for safety; *cell* must be non-*NULL* "
"and must be a cell object."
msgstr ""
# 2ecdfd242dc14d35955965ba20b1dd7a
#: ../src/Doc/c-api/class.rst:6
msgid "Class and Instance Objects"
msgstr ""
# 4f3f8bde76b643df9757ad70e6f84235
#: ../src/Doc/c-api/class.rst:10
msgid ""
"Note that the class objects described here represent old-style classes, "
"which will go away in Python 3. When creating new types for extension "
"modules, you will want to work with type objects (section :ref:"
"`typeobjects`)."
msgstr ""
# 1380a9f90de24ba1b570505a86fcda7e
#: ../src/Doc/c-api/class.rst:17
msgid "The C structure of the objects used to describe built-in classes."
msgstr ""
# 154f895466a7425ba9efb7051c5cc22c
#: ../src/Doc/c-api/class.rst:24
msgid ""
"This is the type object for class objects; it is the same object as ``types."
"ClassType`` in the Python layer."
msgstr ""
# 41dfd8ad671842dc8dc4a130f73fcb3a
#: ../src/Doc/c-api/class.rst:30
msgid ""
"Return true if the object *o* is a class object, including instances of "
"types derived from the standard class object. Return false in all other "
"cases."
msgstr ""
# 9b74721aa78d46208d50bab7387f6989
#: ../src/Doc/c-api/class.rst:36
msgid ""
"Return true if *klass* is a subclass of *base*. Return false in all other "
"cases."
msgstr ""
# d0c1a8a6d36b44d981496545e681fe0e
#: ../src/Doc/c-api/class.rst:41
msgid "There are very few functions specific to instance objects."
msgstr ""
# 0dcbaaba00f04676bb2329ca3cec0f05
#: ../src/Doc/c-api/class.rst:46
msgid "Type object for class instances."
msgstr ""
# f2f362de3aa44eb2902f3d983d85a2fc
#: ../src/Doc/c-api/class.rst:51
msgid "Return true if *obj* is an instance."
msgstr ""
# b402c8ac2cf048e58a37a73ff0826957
#: ../src/Doc/c-api/class.rst:56
msgid ""
"Create a new instance of a specific class. The parameters *arg* and *kw* "
"are used as the positional and keyword parameters to the object's "
"constructor."
msgstr ""
# 567ee8a96f094d809757abb2f7151e33
#: ../src/Doc/c-api/class.rst:62
msgid ""
"Create a new instance of a specific class without calling its constructor. "
"*class* is the class of new object. The *dict* parameter will be used as "
"the object's :attr:`__dict__`; if *NULL*, a new dictionary will be created "
"for the instance."
msgstr ""
#: ../src/Doc/c-api/cobject.rst:6
#, fuzzy
msgid "CObjects"
msgstr "Objets Cellules"
# 37423fd089584c43bf940770ba26ece4
#: ../src/Doc/c-api/cobject.rst:13
msgid ""
"The CObject API is deprecated as of Python 2.7. Please switch to the new :"
"ref:`capsules` API."
msgstr ""
# 5e82b545083d4b038e17e2246854a332
#: ../src/Doc/c-api/cobject.rst:28
msgid "Return true if its argument is a :c:type:`PyCObject`."
msgstr ""
# 815725bbd1d8400e80927e64ee76e097
#: ../src/Doc/c-api/cobject.rst:33
msgid ""
"Create a :c:type:`PyCObject` from the ``void *`` *cobj*. The *destr* "
"function will be called when the object is reclaimed, unless it is *NULL*."
msgstr ""
# c2d641cc3a2b4a24a6a0c4ecfc24d92d
#: ../src/Doc/c-api/cobject.rst:39
msgid ""
"Create a :c:type:`PyCObject` from the :c:type:`void \\*` *cobj*. The "
"*destr* function will be called when the object is reclaimed. The *desc* "
"argument can be used to pass extra callback data for the destructor function."
msgstr ""
# a514fbb3d7ad4c8a8b566bd5b095bb12
#: ../src/Doc/c-api/cobject.rst:46
msgid ""
"Return the object :c:type:`void \\*` that the :c:type:`PyCObject` *self* was "
"created with."
msgstr ""
# abd1163cd525446fb222be9d4613c6ea
#: ../src/Doc/c-api/cobject.rst:52
msgid ""
"Return the description :c:type:`void \\*` that the :c:type:`PyCObject` "
"*self* was created with."
msgstr ""
# 103d4cc4b5c9431f8ccb2756ef4412f3
#: ../src/Doc/c-api/cobject.rst:58
msgid ""
"Set the void pointer inside *self* to *cobj*. The :c:type:`PyCObject` must "
"not have an associated destructor. Return true on success, false on failure."
msgstr ""
#: ../src/Doc/c-api/code.rst:6
msgid "Code Objects"
msgstr "Objets Code"
#: ../src/Doc/c-api/code.rst:14
msgid ""
"Code objects are a low-level detail of the CPython implementation. Each one "
"represents a chunk of executable code that hasn't yet been bound into a "
"function."
msgstr ""
"Les objets Code sont un détail bas-niveau de l'implémentation CPython. "
"Chacun d'eux représente une partie de code exécutable, qui n'a pas encore "
"été lié dans une fonction."
# 2a98249c63414e0b8daeb9c7a8aca236
#: ../src/Doc/c-api/code.rst:20
msgid ""
"The C structure of the objects used to describe code objects. The fields of "
"this type are subject to change at any time."
msgstr ""
# d910c828c32a46b79973f1fa6fc79127
#: ../src/Doc/c-api/code.rst:26
msgid ""
"This is an instance of :c:type:`PyTypeObject` representing the Python :class:"
"`code` type."
msgstr ""
# c05fbf2327ce4860aa347d247426faec
#: ../src/Doc/c-api/code.rst:32
msgid "Return true if *co* is a :class:`code` object"
msgstr ""
# 34abe8c3afa04bbe9e78b7fd0d4fa167
#: ../src/Doc/c-api/code.rst:36
msgid "Return the number of free variables in *co*."
msgstr ""
# 4d9eeff0df2c4e3fb3b9e8844d0f268d
#: ../src/Doc/c-api/code.rst:40
msgid ""
"Return a new code object. If you need a dummy code object to create a "
"frame, use :c:func:`PyCode_NewEmpty` instead. Calling :c:func:`PyCode_New` "
"directly can bind you to a precise Python version since the definition of "
"the bytecode changes often."
msgstr ""
# 75db0ead55444f59bf5c7658ad375f1a
#: ../src/Doc/c-api/code.rst:48
msgid ""
"Return a new empty code object with the specified filename, function name, "
"and first line number. It is illegal to :keyword:`exec` or :func:`eval` the "
"resulting code object."
msgstr ""
# 8115fef901f84b3b98e41fcd9d79c7bf
#: ../src/Doc/c-api/codec.rst:4
msgid "Codec registry and support functions"
msgstr ""
# a37469388ad34a6d8f2283ec2e4e9e92
#: ../src/Doc/c-api/codec.rst:8
msgid "Register a new codec search function."
msgstr ""
# 9cf47b03e9fb4d6ba0bd1b00db7271cb
#: ../src/Doc/c-api/codec.rst:10
msgid ""
"As side effect, this tries to load the :mod:`encodings` package, if not yet "
"done, to make sure that it is always first in the list of search functions."
msgstr ""
# 6138120fd7584d69905a425547027a41
#: ../src/Doc/c-api/codec.rst:15
msgid ""
"Return ``1`` or ``0`` depending on whether there is a registered codec for "
"the given *encoding*."
msgstr ""
# 2fd619ca556342a88416c79ee8a145d3
#: ../src/Doc/c-api/codec.rst:20
msgid "Generic codec based encoding API."
msgstr ""
# 5c95af35a0ee4508b59a2aeded63a1b5
#: ../src/Doc/c-api/codec.rst:22
msgid ""
"*object* is passed through the encoder function found for the given "
"*encoding* using the error handling method defined by *errors*. *errors* "
"may be *NULL* to use the default method defined for the codec. Raises a :"
"exc:`LookupError` if no encoder can be found."
msgstr ""
# 850f3b74ca114b0584cdf27c1c2aa983
#: ../src/Doc/c-api/codec.rst:29
msgid "Generic codec based decoding API."
msgstr ""
# 8bec93e81e4a4cdd886749cbf1788f2a
#: ../src/Doc/c-api/codec.rst:31
msgid ""
"*object* is passed through the decoder function found for the given "
"*encoding* using the error handling method defined by *errors*. *errors* "
"may be *NULL* to use the default method defined for the codec. Raises a :"
"exc:`LookupError` if no encoder can be found."
msgstr ""
# 315c5e3faa13459bbdf50eb7d1123b3d
#: ../src/Doc/c-api/codec.rst:38
msgid "Codec lookup API"
msgstr ""
# c1fd47f831c24ed489493fc8d3de091b
#: ../src/Doc/c-api/codec.rst:40
msgid ""
"In the following functions, the *encoding* string is looked up converted to "
"all lower-case characters, which makes encodings looked up through this "
"mechanism effectively case-insensitive. If no codec is found, a :exc:"
"`KeyError` is set and *NULL* returned."
msgstr ""
# 7dc357235e224247b1f8fb2305c8604e
#: ../src/Doc/c-api/codec.rst:47
msgid "Get an encoder function for the given *encoding*."
msgstr ""
# 81962332e8fb42579a75f3c27526b563
#: ../src/Doc/c-api/codec.rst:51
msgid "Get a decoder function for the given *encoding*."
msgstr ""
# 8b4487ca9e10485d9dd501c3769f298d
#: ../src/Doc/c-api/codec.rst:55
msgid ""
"Get an :class:`~codecs.IncrementalEncoder` object for the given *encoding*."
msgstr ""
# ab082947e89a4b42ad13ad21de175d7a
#: ../src/Doc/c-api/codec.rst:59
msgid ""
"Get an :class:`~codecs.IncrementalDecoder` object for the given *encoding*."
msgstr ""
# bd43a746545f4f21978029aafddc1143
#: ../src/Doc/c-api/codec.rst:63
msgid ""
"Get a :class:`~codecs.StreamReader` factory function for the given "
"*encoding*."
msgstr ""
# 526e189189c944e1aec0e60804f58466
#: ../src/Doc/c-api/codec.rst:67
msgid ""
"Get a :class:`~codecs.StreamWriter` factory function for the given "
"*encoding*."
msgstr ""
# f26dcd8310564d6ab16be5a4d1962a52
#: ../src/Doc/c-api/codec.rst:71
msgid "Registry API for Unicode encoding error handlers"
msgstr ""
# f31578102f0942018e73d9ee2323cb68
#: ../src/Doc/c-api/codec.rst:75
msgid ""
"Register the error handling callback function *error* under the given "
"*name*. This callback function will be called by a codec when it encounters "
"unencodable characters/undecodable bytes and *name* is specified as the "
"error parameter in the call to the encode/decode function."
msgstr ""
# 7c4bc5b6bc0a47d287808169df6cc410
#: ../src/Doc/c-api/codec.rst:80
msgid ""
"The callback gets a single argument, an instance of :exc:"
"`UnicodeEncodeError`, :exc:`UnicodeDecodeError` or :exc:"
"`UnicodeTranslateError` that holds information about the problematic "
"sequence of characters or bytes and their offset in the original string "
"(see :ref:`unicodeexceptions` for functions to extract this information). "
"The callback must either raise the given exception, or return a two-item "
"tuple containing the replacement for the problematic sequence, and an "
"integer giving the offset in the original string at which encoding/decoding "
"should be resumed."
msgstr ""
# 85b3bf18566d40ccba89bda51eb932d5
#: ../src/Doc/c-api/codec.rst:90
msgid "Return ``0`` on success, ``-1`` on error."
msgstr ""
# c291ba04300d4fbc8deb044b055554b0
#: ../src/Doc/c-api/codec.rst:94
msgid ""
"Lookup the error handling callback function registered under *name*. As a "
"special case *NULL* can be passed, in which case the error handling callback "
"for \"strict\" will be returned."
msgstr ""
# ab45ce7a3e6b43c88efe5923eb2a1728
#: ../src/Doc/c-api/codec.rst:100
msgid "Raise *exc* as an exception."
msgstr ""
# 13d774675c1d46feb753ae2bad4ca0c0
#: ../src/Doc/c-api/codec.rst:104
msgid "Ignore the unicode error, skipping the faulty input."
msgstr ""
# 96615de066324c0587bf2f8a4716def0
#: ../src/Doc/c-api/codec.rst:108
msgid "Replace the unicode encode error with ``?`` or ``U+FFFD``."
msgstr ""
# bf4a7b38c7ba414aa009598b060273ba
#: ../src/Doc/c-api/codec.rst:112
msgid "Replace the unicode encode error with XML character references."
msgstr ""
# 5e538d3f4fcb47ffb8a81c1bb84a2955
#: ../src/Doc/c-api/codec.rst:116
msgid ""
"Replace the unicode encode error with backslash escapes (``\\x``, ``\\u`` "
"and ``\\U``)."
msgstr ""
#: ../src/Doc/c-api/complex.rst:6
msgid "Complex Number Objects"
msgstr "Objets Nombres Complexes"
#: ../src/Doc/c-api/complex.rst:10
msgid ""
"Python's complex number objects are implemented as two distinct types when "
"viewed from the C API: one is the Python object exposed to Python programs, "
"and the other is a C structure which represents the actual complex number "
"value. The API provides functions for working with both."
msgstr ""
"Les objets Python nombres complexes sont implémentés comme deux types "
"distincts, lorsqu'ils sont vus de l'API C : l'un est l'objet Python tel "
"qu'il est vu par les programmes Python, et l'autre est une structure C qui "
"représente la valeur complexe courante. L'API fournit des fonctions pour "
"travailler avec ces deux représentations."
#: ../src/Doc/c-api/complex.rst:17
msgid "Complex Numbers as C Structures"
msgstr "Nombres complexes en tant que structures C"
#: ../src/Doc/c-api/complex.rst:19
msgid ""
"Note that the functions which accept these structures as parameters and "
"return them as results do so *by value* rather than dereferencing them "
"through pointers. This is consistent throughout the API."
msgstr ""
"Remarquez que les fonctions qui acceptent ces structures comme paramètres et "
"les retournent comme résultats le font *par valeur* au lieur de les dé-"
"référencer en utilisant des pointeurs. Cela est constant dans toute l'API."
# 0fd63e0f6f144bdcb85145fe70256dc0
#: ../src/Doc/c-api/complex.rst:26
msgid ""
"The C structure which corresponds to the value portion of a Python complex "
"number object. Most of the functions for dealing with complex number "
"objects use structures of this type as input or output values, as "
"appropriate. It is defined as::"
msgstr ""
#: ../src/Doc/c-api/complex.rst:39
#, fuzzy
msgid ""
"Return the sum of two complex numbers, using the C :c:type:`Py_complex` "
"representation."
msgstr ""
"Convertit un nombre complexe Python vers une structure C :ctype:`Py_complex`."
#: ../src/Doc/c-api/complex.rst:45
#, fuzzy
msgid ""
"Return the difference between two complex numbers, using the C :c:type:"
"`Py_complex` representation."
msgstr ""
"Convertit un nombre complexe Python vers une structure C :ctype:`Py_complex`."
#: ../src/Doc/c-api/complex.rst:51
#, fuzzy
msgid ""
"Return the negation of the complex number *complex*, using the C :c:type:"
"`Py_complex` representation."
msgstr ""
"Convertit un nombre complexe Python vers une structure C :ctype:`Py_complex`."
#: ../src/Doc/c-api/complex.rst:57
#, fuzzy
msgid ""
"Return the product of two complex numbers, using the C :c:type:`Py_complex` "
"representation."
msgstr ""
"Convertit un nombre complexe Python vers une structure C :ctype:`Py_complex`."
#: ../src/Doc/c-api/complex.rst:63
#, fuzzy
msgid ""
"Return the quotient of two complex numbers, using the C :c:type:`Py_complex` "
"representation."
msgstr ""
"Convertit un nombre complexe Python vers une structure C :ctype:`Py_complex`."
# 791a1ea49cc845379608d4855f98de35
#: ../src/Doc/c-api/complex.rst:66
msgid ""
"If *divisor* is null, this method returns zero and sets :c:data:`errno` to :"
"c:data:`EDOM`."
msgstr ""
# 0871c6f5eb7c4403b173f088b5c46b0b
#: ../src/Doc/c-api/complex.rst:72
msgid ""
"Return the exponentiation of *num* by *exp*, using the C :c:type:"
"`Py_complex` representation."
msgstr ""
# 38192b49591f4bfebbaf7ad4e97075f3
#: ../src/Doc/c-api/complex.rst:75
msgid ""
"If *num* is null and *exp* is not a positive real number, this method "
"returns zero and sets :c:data:`errno` to :c:data:`EDOM`."
msgstr ""
#: ../src/Doc/c-api/complex.rst:80
msgid "Complex Numbers as Python Objects"
msgstr "Nombres complexes en tant qu'objets Python"
# 8932852f89734a43b7591b37f7cea43a
#: ../src/Doc/c-api/complex.rst:85
msgid ""
"This subtype of :c:type:`PyObject` represents a Python complex number object."
msgstr ""
# 9cc66d4e4cfe438d8bd4c8e6475001e3
#: ../src/Doc/c-api/complex.rst:90
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python complex number "
"type. It is the same object as ``complex`` and ``types.ComplexType``."
msgstr ""
# dfd4b6c21f2c40d9accafacd0f548331
#: ../src/Doc/c-api/complex.rst:96
msgid ""
"Return true if its argument is a :c:type:`PyComplexObject` or a subtype of :"
"c:type:`PyComplexObject`."
msgstr ""
# 84aeb7d279b64cd9865564468927c718
#: ../src/Doc/c-api/complex.rst:105
msgid ""
"Return true if its argument is a :c:type:`PyComplexObject`, but not a "
"subtype of :c:type:`PyComplexObject`."
msgstr ""
#: ../src/Doc/c-api/complex.rst:113
#, fuzzy
msgid ""
"Create a new Python complex number object from a C :c:type:`Py_complex` "
"value."
msgstr ""
"Convertit un nombre complexe Python vers une structure C :ctype:`Py_complex`."
# 4df2e33ea24c473d9fa99382dcfe356b
#: ../src/Doc/c-api/complex.rst:118
msgid "Return a new :c:type:`PyComplexObject` object from *real* and *imag*."
msgstr ""
# 6393c2028a1e4ac4b538fb7a6b7b208f
#: ../src/Doc/c-api/complex.rst:123
msgid "Return the real part of *op* as a C :c:type:`double`."
msgstr ""
#: ../src/Doc/c-api/complex.rst:128
#, fuzzy
msgid "Return the imaginary part of *op* as a C :c:type:`double`."
msgstr "Convertit un nombre flottant Python vers un type C :ctype:`double`."
# 72d2a2b35261408c80182ee55122f9be
#: ../src/Doc/c-api/complex.rst:133
msgid ""
"Return the :c:type:`Py_complex` value of the complex number *op*. Upon "
"failure, this method returns ``-1.0`` as a real value."
msgstr ""
#: ../src/Doc/c-api/concrete.rst:8
msgid "Concrete Objects Layer"
msgstr "Couche des Objets Concrets"
#: ../src/Doc/c-api/concrete.rst:10
#, fuzzy
msgid ""
"The functions in this chapter are specific to certain Python object types. "
"Passing them an object of the wrong type is not a good idea; if you receive "
"an object from a Python program and you are not sure that it has the right "
"type, you must perform a type check first; for example, to check that an "
"object is a dictionary, use :c:func:`PyDict_Check`. The chapter is "
"structured like the \"family tree\" of Python object types."
msgstr ""
"Les fonctions dans ce chapitre sont spécifiques à certains types d'objets "
"Python. Leur donner un objet d'un mauvais type n'est pas une bonne idée. Si "
"vous recevez un objet d'un programme Python et que vous n'êtes pas sûr qu'il "
"est du bon type, vous devez tout d'abord vérifier son type. Par exemple, "
"pour vérifier qu'un objet est un dictionnaire, utiliser :cfunc:"
"`PyDict_Check`. Ce chapitre est structuré comme un \"arbre des familles\" "
"des types d'objets Python."
#: ../src/Doc/c-api/concrete.rst:19
msgid ""
"While the functions described in this chapter carefully check the type of "
"the objects which are passed in, many of them do not check for *NULL* being "
"passed instead of a valid object. Allowing *NULL* to be passed in can cause "
"memory access violations and immediate termination of the interpreter."
msgstr ""
"Tandis que les fonctions décrites dans ce chapitre vérifient avec soin le "
"type des objets qui leur sont passés, beaucoup d'entre elles ne vérifient "
"pas que *NULL* est passé au lieu d'un objet valide. Autoriser *NULL* à être "
"passé peut provoquer des violations d'accès à la mémoire et ainsi terminer "
"immédiatement l'interpréteur."
#: ../src/Doc/c-api/concrete.rst:28
msgid "Fundamental Objects"
msgstr "Objets fondamentaux"
#: ../src/Doc/c-api/concrete.rst:30
msgid ""
"This section describes Python type objects and the singleton object ``None``."
msgstr ""
"Cette section décrit les objets de type Python et l'objet singleton ``None``."
#: ../src/Doc/c-api/concrete.rst:41
msgid "Numeric Objects"
msgstr "Objets numériques"
#: ../src/Doc/c-api/concrete.rst:57
msgid "Sequence Objects"
msgstr "Objets séquences"
#: ../src/Doc/c-api/concrete.rst:61
msgid ""
"Generic operations on sequence objects were discussed in the previous "
"chapter; this section deals with the specific kinds of sequence objects that "
"are intrinsic to the Python language."
msgstr ""
"Les opérations génériques sur les objets séquences ont été discutées dans le "
"chapitre précédent. Cette section traite des genres spécifiques d'objets "
"séquences qui sont intrinsèques au langage Python."
#: ../src/Doc/c-api/concrete.rst:78
msgid "Mapping Objects"
msgstr "Objets association"
#: ../src/Doc/c-api/concrete.rst:90
msgid "Other Objects"
msgstr "Autres Objets"
#: ../src/Doc/c-api/conversion.rst:6
msgid "String conversion and formatting"
msgstr "Conversion et formatage de chaînes"
#: ../src/Doc/c-api/conversion.rst:8
msgid "Functions for number conversion and formatted string output."
msgstr ""
"Fonctions de conversion pour les nombres et pour la sortie des chaînes "
"formattées."
# 595bd9c0422746d39370be853f9cf5ec
#: ../src/Doc/c-api/conversion.rst:13
msgid ""
"Output not more than *size* bytes to *str* according to the format string "
"*format* and the extra arguments. See the Unix man page :manpage:"
"`snprintf(2)`."
msgstr ""
# b016633066cd4ffdbf30b7e52f094224
#: ../src/Doc/c-api/conversion.rst:19
msgid ""
"Output not more than *size* bytes to *str* according to the format string "
"*format* and the variable argument list *va*. Unix man page :manpage:"
"`vsnprintf(2)`."
msgstr ""
# 2e3f7d1290464cc0918cf4c92fcf8308
#: ../src/Doc/c-api/conversion.rst:23
msgid ""
":c:func:`PyOS_snprintf` and :c:func:`PyOS_vsnprintf` wrap the Standard C "
"library functions :c:func:`snprintf` and :c:func:`vsnprintf`. Their purpose "
"is to guarantee consistent behavior in corner cases, which the Standard C "
"functions do not."
msgstr ""
# 85ce4f93a6944ce4a6c94a8b6ade50c9
#: ../src/Doc/c-api/conversion.rst:28
msgid ""
"The wrappers ensure that *str*[*size*-1] is always ``'\\0'`` upon return. "
"They never write more than *size* bytes (including the trailing ``'\\0'`` "
"into str. Both functions require that ``str != NULL``, ``size > 0`` and "
"``format != NULL``."
msgstr ""
# 1ceb1457801344968c51bdbb79c72de6
#: ../src/Doc/c-api/conversion.rst:33
msgid ""
"If the platform doesn't have :c:func:`vsnprintf` and the buffer size needed "
"to avoid truncation exceeds *size* by more than 512 bytes, Python aborts "
"with a *Py_FatalError*."
msgstr ""
#: ../src/Doc/c-api/conversion.rst:37
msgid ""
"The return value (*rv*) for these functions should be interpreted as follows:"
msgstr ""
#: ../src/Doc/c-api/conversion.rst:39
msgid ""
"When ``0 <= rv < size``, the output conversion was successful and *rv* "
"characters were written to *str* (excluding the trailing ``'\\0'`` byte at "
"*str*[*rv*])."
msgstr ""
#: ../src/Doc/c-api/conversion.rst:43
msgid ""
"When ``rv >= size``, the output conversion was truncated and a buffer with "
"``rv + 1`` bytes would have been needed to succeed. *str*[*size*-1] is "
"``'\\0'`` in this case."
msgstr ""
#: ../src/Doc/c-api/conversion.rst:47
msgid ""
"When ``rv < 0``, \"something bad happened.\" *str*[*size*-1] is ``'\\0'`` in "
"this case too, but the rest of *str* is undefined. The exact cause of the "
"error depends on the underlying platform."
msgstr ""
#: ../src/Doc/c-api/conversion.rst:51
msgid ""
"The following functions provide locale-independent string to number "
"conversions."
msgstr ""
# 61e884e049bc43829cd6b331079e768d
#: ../src/Doc/c-api/conversion.rst:56
msgid ""
"Convert a string ``s`` to a :c:type:`double`, raising a Python exception on "
"failure. The set of accepted strings corresponds to the set of strings "
"accepted by Python's :func:`float` constructor, except that ``s`` must not "
"have leading or trailing whitespace. The conversion is independent of the "
"current locale."
msgstr ""
# d9351cc26fe04369a4311d2af5526201
#: ../src/Doc/c-api/conversion.rst:62
msgid ""
"If ``endptr`` is ``NULL``, convert the whole string. Raise ValueError and "
"return ``-1.0`` if the string is not a valid representation of a floating-"
"point number."
msgstr ""
# 468f4d572e3946aba69b22c85cb761ab
#: ../src/Doc/c-api/conversion.rst:66
msgid ""
"If endptr is not ``NULL``, convert as much of the string as possible and set "
"``*endptr`` to point to the first unconverted character. If no initial "
"segment of the string is the valid representation of a floating-point "
"number, set ``*endptr`` to point to the beginning of the string, raise "
"ValueError, and return ``-1.0``."
msgstr ""
# 9c64148fefe34800bf85ba61c782c1d0
#: ../src/Doc/c-api/conversion.rst:73
msgid ""
"If ``s`` represents a value that is too large to store in a float (for "
"example, ``\"1e500\"`` is such a string on many platforms) then if "
"``overflow_exception`` is ``NULL`` return ``Py_HUGE_VAL`` (with an "
"appropriate sign) and don't set any exception. Otherwise, "
"``overflow_exception`` must point to a Python exception object; raise that "
"exception and return ``-1.0``. In both cases, set ``*endptr`` to point to "
"the first character after the converted value."
msgstr ""
# 5f7420afd4a142f59bf783970236a896
#: ../src/Doc/c-api/conversion.rst:81
msgid ""
"If any other error occurs during the conversion (for example an out-of-"
"memory error), set the appropriate Python exception and return ``-1.0``."
msgstr ""
# 465dac88e44f41729a5144d8e9780015
#: ../src/Doc/c-api/conversion.rst:90
msgid ""
"Convert a string to a :c:type:`double`. This function behaves like the "
"Standard C function :c:func:`strtod` does in the C locale. It does this "
"without changing the current locale, since that would not be thread-safe."
msgstr ""
# 0c2c1969c85f4ca58cff5587314198c6
#: ../src/Doc/c-api/conversion.rst:94
msgid ""
":c:func:`PyOS_ascii_strtod` should typically be used for reading "
"configuration files or other non-user input that should be locale "
"independent."
msgstr ""
# 6fdac154777b4ad48a2e81a262ad2cfc
#: ../src/Doc/c-api/conversion.rst:97
msgid "See the Unix man page :manpage:`strtod(2)` for details."
msgstr ""
# 533affc65a7e4c57b0f9d2230070d0ec
#: ../src/Doc/c-api/conversion.rst:108
msgid ""
"Convert a :c:type:`double` to a string using the ``'.'`` as the decimal "
"separator. *format* is a :c:func:`printf`\\ -style format string specifying "
"the number format. Allowed conversion characters are ``'e'``, ``'E'``, "
"``'f'``, ``'F'``, ``'g'`` and ``'G'``."
msgstr ""
# b81588405a6b477ebb63aec166f55ae7
#: ../src/Doc/c-api/conversion.rst:113
msgid ""
"The return value is a pointer to *buffer* with the converted string or NULL "
"if the conversion failed."
msgstr ""
# 0334402cef2541c19dba4e03552eafb9
#: ../src/Doc/c-api/conversion.rst:124
msgid ""
"Convert a :c:type:`double` *val* to a string using supplied *format_code*, "
"*precision*, and *flags*."
msgstr ""
# 3ddc8ee1a7fb427c8eea3859cd1c0d78
#: ../src/Doc/c-api/conversion.rst:127
msgid ""
"*format_code* must be one of ``'e'``, ``'E'``, ``'f'``, ``'F'``, ``'g'``, "
"``'G'`` or ``'r'``. For ``'r'``, the supplied *precision* must be 0 and is "
"ignored. The ``'r'`` format code specifies the standard :func:`repr` format."
msgstr ""
# 358eaa5326d3439896cb892f5baa85f1
#: ../src/Doc/c-api/conversion.rst:132
msgid ""
"*flags* can be zero or more of the values *Py_DTSF_SIGN*, "
"*Py_DTSF_ADD_DOT_0*, or *Py_DTSF_ALT*, or-ed together:"
msgstr ""
# b34e889499e64973abc9df259daf15d7
#: ../src/Doc/c-api/conversion.rst:135
msgid ""
"*Py_DTSF_SIGN* means to always precede the returned string with a sign "
"character, even if *val* is non-negative."
msgstr ""
# 171936608cf142bea2d8dccc39605938
#: ../src/Doc/c-api/conversion.rst:138
msgid ""
"*Py_DTSF_ADD_DOT_0* means to ensure that the returned string will not look "
"like an integer."
msgstr ""
# 9f9c515261a34fcaa74258c3d9699095
#: ../src/Doc/c-api/conversion.rst:141
msgid ""
"*Py_DTSF_ALT* means to apply \"alternate\" formatting rules. See the "
"documentation for the :c:func:`PyOS_snprintf` ``'#'`` specifier for details."
msgstr ""
# 8acf15d034714be98850cc733ce33523
#: ../src/Doc/c-api/conversion.rst:145
msgid ""
"If *ptype* is non-NULL, then the value it points to will be set to one of "
"*Py_DTST_FINITE*, *Py_DTST_INFINITE*, or *Py_DTST_NAN*, signifying that "
"*val* is a finite number, an infinite number, or not a number, respectively."
msgstr ""
# 30c7a5f6c42246e1b8a40c386752f39a
#: ../src/Doc/c-api/conversion.rst:149
msgid ""
"The return value is a pointer to *buffer* with the converted string or "
"*NULL* if the conversion failed. The caller is responsible for freeing the "
"returned string by calling :c:func:`PyMem_Free`."
msgstr ""
# d82fc68dcb1c474cb6427647267922f1
#: ../src/Doc/c-api/conversion.rst:158
msgid "Convert a string to a :c:type:`double` in a locale-independent way."
msgstr ""
# 402cc069e67d4b0eaa8d346f5af0214d
#: ../src/Doc/c-api/conversion.rst:160
msgid "See the Unix man page :manpage:`atof(2)` for details."
msgstr ""
# 43a238e65df44639893be166a307c0db
#: ../src/Doc/c-api/conversion.rst:170
msgid ""
"Case insensitive comparison of strings. The function works almost "
"identically to :c:func:`strcmp` except that it ignores the case."
msgstr ""
# 83c9b281ee0a49898221fe39f8964a3a
#: ../src/Doc/c-api/conversion.rst:178
msgid ""
"Case insensitive comparison of strings. The function works almost "
"identically to :c:func:`strncmp` except that it ignores the case."
msgstr ""
#: ../src/Doc/c-api/datetime.rst:6
msgid "DateTime Objects"
msgstr "Objets DateTime"
# ec62f0e76d7b4262b9ab6c64216677e3
#: ../src/Doc/c-api/datetime.rst:8
msgid ""
"Various date and time objects are supplied by the :mod:`datetime` module. "
"Before using any of these functions, the header file :file:`datetime.h` must "
"be included in your source (note that this is not included by :file:`Python."
"h`), and the macro :c:macro:`PyDateTime_IMPORT` must be invoked, usually as "
"part of the module initialisation function. The macro puts a pointer to a C "
"structure into a static variable, :c:data:`PyDateTimeAPI`, that is used by "
"the following macros."
msgstr ""
#: ../src/Doc/c-api/datetime.rst:16
msgid "Type-check macros:"
msgstr ""
# 4aaa99ecb0e14d35b382cc864f6f53b2
#: ../src/Doc/c-api/datetime.rst:21
msgid ""
"Return true if *ob* is of type :c:data:`PyDateTime_DateType` or a subtype "
"of :c:data:`PyDateTime_DateType`. *ob* must not be *NULL*."
msgstr ""
# e1f918ab4b83489f8670efdf09d01dcb
#: ../src/Doc/c-api/datetime.rst:29
msgid ""
"Return true if *ob* is of type :c:data:`PyDateTime_DateType`. *ob* must not "
"be *NULL*."
msgstr ""
# 2a62f399f9db4dc1accf3294f4e38a25
#: ../src/Doc/c-api/datetime.rst:37
msgid ""
"Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType` or a "
"subtype of :c:data:`PyDateTime_DateTimeType`. *ob* must not be *NULL*."
msgstr ""
# 42cd720aa1a34caaa5de0c85ed717428
#: ../src/Doc/c-api/datetime.rst:45
msgid ""
"Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType`. *ob* must "
"not be *NULL*."
msgstr ""
# 25429a020e8b41259b97e39a0185b4d9
#: ../src/Doc/c-api/datetime.rst:53
msgid ""
"Return true if *ob* is of type :c:data:`PyDateTime_TimeType` or a subtype "
"of :c:data:`PyDateTime_TimeType`. *ob* must not be *NULL*."
msgstr ""
# bdcbb74b0e6243bb82f9e3b380cb76c7
#: ../src/Doc/c-api/datetime.rst:61
msgid ""
"Return true if *ob* is of type :c:data:`PyDateTime_TimeType`. *ob* must not "
"be *NULL*."
msgstr ""
# d36dc026d33b483db5e5e567e217a7f1
#: ../src/Doc/c-api/datetime.rst:69
msgid ""
"Return true if *ob* is of type :c:data:`PyDateTime_DeltaType` or a subtype "
"of :c:data:`PyDateTime_DeltaType`. *ob* must not be *NULL*."
msgstr ""
# dccaccef51234ac0934979917ea78da6
#: ../src/Doc/c-api/datetime.rst:77
msgid ""
"Return true if *ob* is of type :c:data:`PyDateTime_DeltaType`. *ob* must not "
"be *NULL*."
msgstr ""
# 9cc38cc4cda4418298a3365d519adf7d
#: ../src/Doc/c-api/datetime.rst:85
msgid ""
"Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType` or a subtype "
"of :c:data:`PyDateTime_TZInfoType`. *ob* must not be *NULL*."
msgstr ""
# f4f5fcfe2e494f7fa0b0a21ec764952c
#: ../src/Doc/c-api/datetime.rst:93
msgid ""
"Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType`. *ob* must "
"not be *NULL*."
msgstr ""
#: ../src/Doc/c-api/datetime.rst:98
msgid "Macros to create objects:"
msgstr ""
# be080a84386843d5a339f35c7319bcd8
#: ../src/Doc/c-api/datetime.rst:103
msgid ""
"Return a ``datetime.date`` object with the specified year, month and day."
msgstr ""
# dadd495ed53948d7bb792c4560b8b7df
#: ../src/Doc/c-api/datetime.rst:110
msgid ""
"Return a ``datetime.datetime`` object with the specified year, month, day, "
"hour, minute, second and microsecond."
msgstr ""
# 32ae5339f84d453bb3024aa335c4ddbb
#: ../src/Doc/c-api/datetime.rst:118
msgid ""
"Return a ``datetime.time`` object with the specified hour, minute, second "
"and microsecond."
msgstr ""
# 7b784a13a1b84a8e96eb7c10d1be90c1
#: ../src/Doc/c-api/datetime.rst:126
msgid ""
"Return a ``datetime.timedelta`` object representing the given number of "
"days, seconds and microseconds. Normalization is performed so that the "
"resulting number of microseconds and seconds lie in the ranges documented "
"for ``datetime.timedelta`` objects."
msgstr ""
# 59b6e8fa63c040ac9f085e4426067f5b
#: ../src/Doc/c-api/datetime.rst:133
msgid ""
"Macros to extract fields from date objects. The argument must be an "
"instance of :c:data:`PyDateTime_Date`, including subclasses (such as :c:data:"
"`PyDateTime_DateTime`). The argument must not be *NULL*, and the type is "
"not checked:"
msgstr ""
# d88547a849274ff48fd3a9ae125993c6
#: ../src/Doc/c-api/datetime.rst:141
msgid "Return the year, as a positive int."
msgstr ""
# 2b57f3b42e6044d9bf089c4cc73d96fc
#: ../src/Doc/c-api/datetime.rst:148
msgid "Return the month, as an int from 1 through 12."
msgstr ""
# b627d8f737af4c13a98b0c0523308c75
#: ../src/Doc/c-api/datetime.rst:155
msgid "Return the day, as an int from 1 through 31."
msgstr ""
# 22d54063816e4c02a8551da7591a6515
#: ../src/Doc/c-api/datetime.rst:159
msgid ""
"Macros to extract fields from datetime objects. The argument must be an "
"instance of :c:data:`PyDateTime_DateTime`, including subclasses. The "
"argument must not be *NULL*, and the type is not checked:"
msgstr ""
# 0ea7af06f9674f8d921222243d61b240
# 8f59091310a943e5a315ad8ef6356e27
#: ../src/Doc/c-api/datetime.rst:166 ../src/Doc/c-api/datetime.rst:198
msgid "Return the hour, as an int from 0 through 23."
msgstr ""
# bf84ce3623ef4060820d940c47555ea5
# 4a4b84aed0394829817581b117a08282
#: ../src/Doc/c-api/datetime.rst:173 ../src/Doc/c-api/datetime.rst:205
msgid "Return the minute, as an int from 0 through 59."
msgstr ""
# 557c7196373d49b9be1e4ce870776293
# 646e77103c77462badba7c1aed012be7
#: ../src/Doc/c-api/datetime.rst:180 ../src/Doc/c-api/datetime.rst:212
msgid "Return the second, as an int from 0 through 59."
msgstr ""
# cf3bafda682444c3a7382058c8109078
# 9956d96662854ce58083b88fb81141c4
#: ../src/Doc/c-api/datetime.rst:187 ../src/Doc/c-api/datetime.rst:219
msgid "Return the microsecond, as an int from 0 through 999999."
msgstr ""
# 093af03a28b34d75b05a42a798be9d90
#: ../src/Doc/c-api/datetime.rst:191
msgid ""
"Macros to extract fields from time objects. The argument must be an "
"instance of :c:data:`PyDateTime_Time`, including subclasses. The argument "
"must not be *NULL*, and the type is not checked:"
msgstr ""
#: ../src/Doc/c-api/datetime.rst:223
msgid "Macros for the convenience of modules implementing the DB API:"
msgstr ""
# b3bb49260c8142eabd7f648edb10b6ac
#: ../src/Doc/c-api/datetime.rst:228
msgid ""
"Create and return a new ``datetime.datetime`` object given an argument tuple "
"suitable for passing to ``datetime.datetime.fromtimestamp()``."
msgstr ""
# 7cd8683ea01149269a7a308fc6099472
#: ../src/Doc/c-api/datetime.rst:236
msgid ""
"Create and return a new ``datetime.date`` object given an argument tuple "
"suitable for passing to ``datetime.date.fromtimestamp()``."
msgstr ""
#: ../src/Doc/c-api/descriptor.rst:6
msgid "Descriptor Objects"
msgstr ""
#: ../src/Doc/c-api/descriptor.rst:8
msgid ""
"\"Descriptors\" are objects that describe some attribute of an object. They "
"are found in the dictionary of type objects."
msgstr ""
# 64d2c5e7cd314c798d7a8b59cbd2d372
#: ../src/Doc/c-api/descriptor.rst:14
msgid "The type object for the built-in descriptor types."
msgstr ""
# ca39b6cbee1449cab1894392c82623a8
#: ../src/Doc/c-api/descriptor.rst:46
msgid ""
"Return true if the descriptor objects *descr* describes a data attribute, or "
"false if it describes a method. *descr* must be a descriptor object; there "
"is no error checking."
msgstr ""
#: ../src/Doc/c-api/dict.rst:6
msgid "Dictionary Objects"
msgstr "Objets dictionnaires"
# 034585a99548412a978b2b0b0bb90c41
#: ../src/Doc/c-api/dict.rst:13
msgid ""
"This subtype of :c:type:`PyObject` represents a Python dictionary object."
msgstr ""
# f8682300221f4a4491d62c77dd3ff38a
#: ../src/Doc/c-api/dict.rst:22
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python dictionary "
"type. This is exposed to Python programs as ``dict`` and ``types.DictType``."
msgstr ""
# a6c69788b76e435a9a53da2ce70bded4
#: ../src/Doc/c-api/dict.rst:29
msgid ""
"Return true if *p* is a dict object or an instance of a subtype of the dict "
"type."
msgstr ""
# f035565bc4624ab09ecba69455a5248a
#: ../src/Doc/c-api/dict.rst:38
msgid ""
"Return true if *p* is a dict object, but not an instance of a subtype of the "
"dict type."
msgstr ""
# 9bee4d328585453d861c082493d1f6f0
#: ../src/Doc/c-api/dict.rst:46
msgid "Return a new empty dictionary, or *NULL* on failure."
msgstr ""
# d94ee84fca074e87a05c7f9a06b1e96b
#: ../src/Doc/c-api/dict.rst:51
msgid ""
"Return a proxy object for a mapping which enforces read-only behavior. This "
"is normally used to create a proxy to prevent modification of the dictionary "
"for non-dynamic class types."
msgstr ""
# ccf52f5908df4b3b8cf03d465098fd27
#: ../src/Doc/c-api/dict.rst:60
msgid "Empty an existing dictionary of all key-value pairs."
msgstr ""
# 871e1110758a457787be282ec5f442fd
#: ../src/Doc/c-api/dict.rst:65
msgid ""
"Determine if dictionary *p* contains *key*. If an item in *p* is matches "
"*key*, return ``1``, otherwise return ``0``. On error, return ``-1``. This "
"is equivalent to the Python expression ``key in p``."
msgstr ""
# e193409ab56646dfb4433eabc279f445
#: ../src/Doc/c-api/dict.rst:74
msgid "Return a new dictionary that contains the same key-value pairs as *p*."
msgstr ""
# e4f7d94e19004553bfb3a4cb2bf5af0e
#: ../src/Doc/c-api/dict.rst:81
msgid ""
"Insert *value* into the dictionary *p* with a key of *key*. *key* must be :"
"term:`hashable`; if it isn't, :exc:`TypeError` will be raised. Return ``0`` "
"on success or ``-1`` on failure."
msgstr ""
# 81e99bd7d6bc4cbf8261d1363fdcb813
#: ../src/Doc/c-api/dict.rst:90
msgid ""
"Insert *value* into the dictionary *p* using *key* as a key. *key* should be "
"a :c:type:`char\\*`. The key object is created using "
"``PyString_FromString(key)``. Return ``0`` on success or ``-1`` on failure."
msgstr ""
# a410f6b62c3b4e27a33b24a2333136c0
#: ../src/Doc/c-api/dict.rst:98
msgid ""
"Remove the entry in dictionary *p* with key *key*. *key* must be hashable; "
"if it isn't, :exc:`TypeError` is raised. Return ``0`` on success or ``-1`` "
"on failure."
msgstr ""
# 1d03a04a52d44945861b4e727bf4da0c
#: ../src/Doc/c-api/dict.rst:105
msgid ""
"Remove the entry in dictionary *p* which has a key specified by the string "
"*key*. Return ``0`` on success or ``-1`` on failure."
msgstr ""
# 8932b22687fe4c40b50334b3b2908bd6
#: ../src/Doc/c-api/dict.rst:111
msgid ""
"Return the object from dictionary *p* which has a key *key*. Return *NULL* "
"if the key *key* is not present, but *without* setting an exception."
msgstr ""
# 5ea94ee234824d36962d51932af1d4cf
#: ../src/Doc/c-api/dict.rst:117
msgid ""
"This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as a :c:"
"type:`char\\*`, rather than a :c:type:`PyObject\\*`."
msgstr ""
# bb925cccb0964422b827b3225660644c
#: ../src/Doc/c-api/dict.rst:123
msgid ""
"Return a :c:type:`PyListObject` containing all the items from the "
"dictionary, as in the dictionary method :meth:`dict.items`."
msgstr ""
# 3f222f40424d4f57b2b3b58f3f6e92db
#: ../src/Doc/c-api/dict.rst:129
msgid ""
"Return a :c:type:`PyListObject` containing all the keys from the dictionary, "
"as in the dictionary method :meth:`dict.keys`."
msgstr ""
# 3d57a08825c34fe68b3226e35f8d6644
#: ../src/Doc/c-api/dict.rst:135
msgid ""
"Return a :c:type:`PyListObject` containing all the values from the "
"dictionary *p*, as in the dictionary method :meth:`dict.values`."
msgstr ""
# 2cfe674c9c384f86851a8ea435d8f44f
#: ../src/Doc/c-api/dict.rst:143
msgid ""
"Return the number of items in the dictionary. This is equivalent to "
"``len(p)`` on a dictionary."
msgstr ""
# 931a6ce4bcc2440581bcbcc6d80ad0f8
#: ../src/Doc/c-api/dict.rst:153
msgid ""
"Iterate over all key-value pairs in the dictionary *p*. The :c:type:"
"`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` prior to the "
"first call to this function to start the iteration; the function returns "
"true for each pair in the dictionary, and false once all pairs have been "
"reported. The parameters *pkey* and *pvalue* should either point to :c:type:"
"`PyObject\\*` variables that will be filled in with each key and value, "
"respectively, or may be *NULL*. Any references returned through them are "
"borrowed. *ppos* should not be altered during iteration. Its value "
"represents offsets within the internal dictionary structure, and since the "
"structure is sparse, the offsets are not consecutive."
msgstr ""
# d8c93165b881432ebb4d3cc49f511720
#: ../src/Doc/c-api/dict.rst:164
msgid "For example::"
msgstr "Par exemple ::"
# 1913752be42e4cacaca914d1142ab2fa
#: ../src/Doc/c-api/dict.rst:174
msgid ""
"The dictionary *p* should not be mutated during iteration. It is safe "
"(since Python 2.1) to modify the values of the keys as you iterate over the "
"dictionary, but only so long as the set of keys does not change. For "
"example::"
msgstr ""
# 1d29594c156e4095b994dfd4b36f6355
#: ../src/Doc/c-api/dict.rst:201
msgid ""
"Iterate over mapping object *b* adding key-value pairs to dictionary *a*. "
"*b* may be a dictionary, or any object supporting :c:func:`PyMapping_Keys` "
"and :c:func:`PyObject_GetItem`. If *override* is true, existing pairs in *a* "
"will be replaced if a matching key is found in *b*, otherwise pairs will "
"only be added if there is not a matching key in *a*. Return ``0`` on success "
"or ``-1`` if an exception was raised."
msgstr ""
# 4539c6848bbd4673a06a40e2d0a1be0e
#: ../src/Doc/c-api/dict.rst:213
msgid ""
"This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to ``a."
"update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall back "
"to the iterating over a sequence of key value pairs if the second argument "
"has no \"keys\" attribute. Return ``0`` on success or ``-1`` if an "
"exception was raised."
msgstr ""
# 82157ba989f749cda605945f8ac8906f
#: ../src/Doc/c-api/dict.rst:224
msgid ""
"Update or merge into dictionary *a*, from the key-value pairs in *seq2*. "
"*seq2* must be an iterable object producing iterable objects of length 2, "
"viewed as key-value pairs. In case of duplicate keys, the last wins if "
"*override* is true, else the first wins. Return ``0`` on success or ``-1`` "
"if an exception was raised. Equivalent Python (except for the return value)::"
msgstr ""
#: ../src/Doc/c-api/exceptions.rst:8
msgid "Exception Handling"
msgstr "Gestion des exceptions"
# 36077af0150b405e8dde043ee190a4d3
#: ../src/Doc/c-api/exceptions.rst:10
msgid ""
"The functions described in this chapter will let you handle and raise Python "
"exceptions. It is important to understand some of the basics of Python "
"exception handling. It works somewhat like the Unix :c:data:`errno` "
"variable: there is a global indicator (per thread) of the last error that "
"occurred. Most functions don't clear this on success, but will set it to "
"indicate the cause of the error on failure. Most functions also return an "
"error indicator, usually *NULL* if they are supposed to return a pointer, or "
"``-1`` if they return an integer (exception: the :c:func:`PyArg_\\*` "
"functions return ``1`` for success and ``0`` for failure)."
msgstr ""
#: ../src/Doc/c-api/exceptions.rst:20
msgid ""
"When a function must fail because some function it called failed, it "
"generally doesn't set the error indicator; the function it called already "
"set it. It is responsible for either handling the error and clearing the "
"exception or returning after cleaning up any resources it holds (such as "
"object references or memory allocations); it should *not* continue normally "
"if it is not prepared to handle the error. If returning due to an error, it "
"is important to indicate to the caller that an error has been set. If the "
"error is not handled or carefully propagated, additional calls into the "
"Python/C API may not behave as intended and may fail in mysterious ways."
msgstr ""
# 0ec5db9c97a14df58426cffb41beaa2c
#: ../src/Doc/c-api/exceptions.rst:35
msgid ""
"The error indicator consists of three Python objects corresponding to the "
"Python variables ``sys.exc_type``, ``sys.exc_value`` and ``sys."
"exc_traceback``. API functions exist to interact with the error indicator in "
"various ways. There is a separate error indicator for each thread."
msgstr ""
# 9b4be0fbc2e941068b3537f69fb2c384
#: ../src/Doc/c-api/exceptions.rst:46
msgid ""
"Print a standard traceback to ``sys.stderr`` and clear the error indicator. "
"Call this function only when the error indicator is set. (Otherwise it will "
"cause a fatal error!)"
msgstr ""
# 623f4719fdab48c396fa38b766518bec
#: ../src/Doc/c-api/exceptions.rst:50
msgid ""
"If *set_sys_last_vars* is nonzero, the variables :data:`sys.last_type`, :"
"data:`sys.last_value` and :data:`sys.last_traceback` will be set to the "
"type, value and traceback of the printed exception, respectively."
msgstr ""
# 7cf289fd5d924f96a822d3bfa85b9253
#: ../src/Doc/c-api/exceptions.rst:57
msgid "Alias for ``PyErr_PrintEx(1)``."
msgstr ""
# 5a25516ad9864adc909d7ed11d7610f4
#: ../src/Doc/c-api/exceptions.rst:62
msgid ""
"Test whether the error indicator is set. If set, return the exception "
"*type* (the first argument to the last call to one of the :c:func:`PyErr_Set"
"\\*` functions or to :c:func:`PyErr_Restore`). If not set, return *NULL*. "
"You do not own a reference to the return value, so you do not need to :c:"
"func:`Py_DECREF` it."
msgstr ""
# eac4dbd7951345a2b2c21e7a2eacb202
#: ../src/Doc/c-api/exceptions.rst:70
msgid ""
"Do not compare the return value to a specific exception; use :c:func:"
"`PyErr_ExceptionMatches` instead, shown below. (The comparison could easily "
"fail since the exception may be an instance instead of a class, in the case "
"of a class exception, or it may the a subclass of the expected exception.)"
msgstr ""
# 58c719fd21fb4d0fa5e618c6b93a0fd8
#: ../src/Doc/c-api/exceptions.rst:78
msgid ""
"Equivalent to ``PyErr_GivenExceptionMatches(PyErr_Occurred(), exc)``. This "
"should only be called when an exception is actually set; a memory access "
"violation will occur if no exception has been raised."
msgstr ""
# 519e4df5412841568109daca6163e9dc
#: ../src/Doc/c-api/exceptions.rst:85
msgid ""
"Return true if the *given* exception matches the exception in *exc*. If "
"*exc* is a class object, this also returns true when *given* is an instance "
"of a subclass. If *exc* is a tuple, all exceptions in the tuple (and "
"recursively in subtuples) are searched for a match."
msgstr ""
# 79ff7da5db22468580f9bd12652d3481
#: ../src/Doc/c-api/exceptions.rst:93
msgid ""
"Under certain circumstances, the values returned by :c:func:`PyErr_Fetch` "
"below can be \"unnormalized\", meaning that ``*exc`` is a class object but "
"``*val`` is not an instance of the same class. This function can be used "
"to instantiate the class in that case. If the values are already "
"normalized, nothing happens. The delayed normalization is implemented to "
"improve performance."
msgstr ""
# f22ccf12c8b0427abef1fe6d9a898344
#: ../src/Doc/c-api/exceptions.rst:102
msgid ""
"Clear the error indicator. If the error indicator is not set, there is no "
"effect."
msgstr ""
# 7f154b6d65154faa89c595a44d1efe5d
#: ../src/Doc/c-api/exceptions.rst:108
msgid ""
"Retrieve the error indicator into three variables whose addresses are "
"passed. If the error indicator is not set, set all three variables to "
"*NULL*. If it is set, it will be cleared and you own a reference to each "
"object retrieved. The value and traceback object may be *NULL* even when "
"the type object is not."
msgstr ""
# 1f5aef6bb43746a588f486e98ede4341
#: ../src/Doc/c-api/exceptions.rst:115
msgid ""
"This function is normally only used by code that needs to handle exceptions "
"or by code that needs to save and restore the error indicator temporarily."
msgstr ""
# 5966026acc7144529ccf95064c42712c
#: ../src/Doc/c-api/exceptions.rst:121
msgid ""
"Set the error indicator from the three objects. If the error indicator is "
"already set, it is cleared first. If the objects are *NULL*, the error "
"indicator is cleared. Do not pass a *NULL* type and non-*NULL* value or "
"traceback. The exception type should be a class. Do not pass an invalid "
"exception type or value. (Violating these rules will cause subtle problems "
"later.) This call takes away a reference to each object: you must own a "
"reference to each object before the call and after the call you no longer "
"own these references. (If you don't understand this, don't use this "
"function. I warned you.)"
msgstr ""
# d88d0356f06c490699e86ddc6eba94af
#: ../src/Doc/c-api/exceptions.rst:133
msgid ""
"This function is normally only used by code that needs to save and restore "
"the error indicator temporarily; use :c:func:`PyErr_Fetch` to save the "
"current exception state."
msgstr ""
# 5a363b6f1c3447ee8bfa394e09085865
#: ../src/Doc/c-api/exceptions.rst:140
msgid ""
"This is the most common way to set the error indicator. The first argument "
"specifies the exception type; it is normally one of the standard exceptions, "
"e.g. :c:data:`PyExc_RuntimeError`. You need not increment its reference "
"count. The second argument is an error message; it is converted to a string "
"object."
msgstr ""
# d29871d950b54ff69875c4b2e7025729
#: ../src/Doc/c-api/exceptions.rst:148
msgid ""
"This function is similar to :c:func:`PyErr_SetString` but lets you specify "
"an arbitrary Python object for the \"value\" of the exception."
msgstr ""
# 4d9b35429ead4bf1ade2cbe4cc0553da
#: ../src/Doc/c-api/exceptions.rst:154
msgid ""
"This function sets the error indicator and returns *NULL*. *exception* "
"should be a Python exception class. The *format* and subsequent parameters "
"help format the error message; they have the same meaning and values as in :"
"c:func:`PyString_FromFormat`."
msgstr ""
# d2e24a91af924b8da59cd1bc86f7d9ab
#: ../src/Doc/c-api/exceptions.rst:162
msgid "This is a shorthand for ``PyErr_SetObject(type, Py_None)``."
msgstr ""
# 941db3a999a745859f8ee72d622a7fc5
#: ../src/Doc/c-api/exceptions.rst:167
msgid ""
"This is a shorthand for ``PyErr_SetString(PyExc_TypeError, message)``, where "
"*message* indicates that a built-in operation was invoked with an illegal "
"argument. It is mostly for internal use."
msgstr ""
# 40f7de91b4be4ba284c47906ab92afde
#: ../src/Doc/c-api/exceptions.rst:174
msgid ""
"This is a shorthand for ``PyErr_SetNone(PyExc_MemoryError)``; it returns "
"*NULL* so an object allocation function can write ``return PyErr_NoMemory();"
"`` when it runs out of memory."
msgstr ""
# b3e58c74a11242e9a741a8762a2b7436
#: ../src/Doc/c-api/exceptions.rst:183
msgid ""
"This is a convenience function to raise an exception when a C library "
"function has returned an error and set the C variable :c:data:`errno`. It "
"constructs a tuple object whose first item is the integer :c:data:`errno` "
"value and whose second item is the corresponding error message (gotten from :"
"c:func:`strerror`), and then calls ``PyErr_SetObject(type, object)``. On "
"Unix, when the :c:data:`errno` value is :const:`EINTR`, indicating an "
"interrupted system call, this calls :c:func:`PyErr_CheckSignals`, and if "
"that set the error indicator, leaves it set to that. The function always "
"returns *NULL*, so a wrapper function around a system call can write "
"``return PyErr_SetFromErrno(type);`` when the system call returns an error."
msgstr ""
# a615985919a449c0bedb44159bd818d9
#: ../src/Doc/c-api/exceptions.rst:197
msgid ""
"Similar to :c:func:`PyErr_SetFromErrno`, with the additional behavior that "
"if *filenameObject* is not *NULL*, it is passed to the constructor of *type* "
"as a third parameter. In the case of exceptions such as :exc:`IOError` and :"
"exc:`OSError`, this is used to define the :attr:`filename` attribute of the "
"exception instance."
msgstr ""
# f87f1f17e5224d2c955313b522d78e57
#: ../src/Doc/c-api/exceptions.rst:206
msgid ""
"Similar to :c:func:`PyErr_SetFromErrnoWithFilenameObject`, but the filename "
"is given as a C string."
msgstr ""
# 42a2831c58374774b920f094090cec24
#: ../src/Doc/c-api/exceptions.rst:212
msgid ""
"This is a convenience function to raise :exc:`WindowsError`. If called with "
"*ierr* of :c:data:`0`, the error code returned by a call to :c:func:"
"`GetLastError` is used instead. It calls the Win32 function :c:func:"
"`FormatMessage` to retrieve the Windows description of error code given by "
"*ierr* or :c:func:`GetLastError`, then it constructs a tuple object whose "
"first item is the *ierr* value and whose second item is the corresponding "
"error message (gotten from :c:func:`FormatMessage`), and then calls "
"``PyErr_SetObject(PyExc_WindowsError, object)``. This function always "
"returns *NULL*. Availability: Windows."
msgstr ""
# f87f1f17e5224d2c955313b522d78e57
#: ../src/Doc/c-api/exceptions.rst:224
msgid ""
"Similar to :c:func:`PyErr_SetFromWindowsErr`, with an additional parameter "
"specifying the exception type to be raised. Availability: Windows."
msgstr ""
# 0eee7700ce7344189f93cba72a318d16
#: ../src/Doc/c-api/exceptions.rst:232
msgid ""
"Similar to :c:func:`PyErr_SetFromWindowsErr`, with the additional behavior "
"that if *filenameObject* is not *NULL*, it is passed to the constructor of :"
"exc:`WindowsError` as a third parameter. Availability: Windows."
msgstr ""
# d53114e34e704cc081324a4445de7d8d
#: ../src/Doc/c-api/exceptions.rst:239
msgid ""
"Similar to :c:func:`PyErr_SetFromWindowsErrWithFilenameObject`, but the "
"filename is given as a C string. Availability: Windows."
msgstr ""
# d53114e34e704cc081324a4445de7d8d
#: ../src/Doc/c-api/exceptions.rst:245
msgid ""
"Similar to :c:func:`PyErr_SetFromWindowsErrWithFilenameObject`, with an "
"additional parameter specifying the exception type to be raised. "
"Availability: Windows."
msgstr ""
# d53114e34e704cc081324a4445de7d8d
#: ../src/Doc/c-api/exceptions.rst:254
msgid ""
"Similar to :c:func:`PyErr_SetFromWindowsErrWithFilename`, with an additional "
"parameter specifying the exception type to be raised. Availability: Windows."
msgstr ""
# 932101b5bca44331a3634de2e69c9f65
#: ../src/Doc/c-api/exceptions.rst:262
msgid ""
"This is a shorthand for ``PyErr_SetString(PyExc_SystemError, message)``, "
"where *message* indicates that an internal operation (e.g. a Python/C API "
"function) was invoked with an illegal argument. It is mostly for internal "
"use."
msgstr ""
# bba89428417e4043b837aa9d5986fc1f
#: ../src/Doc/c-api/exceptions.rst:270
msgid ""
"Issue a warning message. The *category* argument is a warning category (see "
"below) or *NULL*; the *message* argument is a message string. *stacklevel* "
"is a positive number giving a number of stack frames; the warning will be "
"issued from the currently executing line of code in that stack frame. A "
"*stacklevel* of 1 is the function calling :c:func:`PyErr_WarnEx`, 2 is the "
"function above that, and so forth."
msgstr ""
# 25c906a19cff4262ac3a046065595936
#: ../src/Doc/c-api/exceptions.rst:277
msgid ""
"This function normally prints a warning message to *sys.stderr*; however, it "
"is also possible that the user has specified that warnings are to be turned "
"into errors, and in that case this will raise an exception. It is also "
"possible that the function raises an exception because of a problem with the "
"warning machinery (the implementation imports the :mod:`warnings` module to "
"do the heavy lifting). The return value is ``0`` if no exception is raised, "
"or ``-1`` if an exception is raised. (It is not possible to determine "
"whether a warning message is actually printed, nor what the reason is for "
"the exception; this is intentional.) If an exception is raised, the caller "
"should do its normal exception handling (for example, :c:func:`Py_DECREF` "
"owned references and return an error value)."
msgstr ""
# 0beb36f0a03547d181d62d42d947a8f5
#: ../src/Doc/c-api/exceptions.rst:289
msgid ""
"Warning categories must be subclasses of :c:data:`Warning`; the default "
"warning category is :c:data:`RuntimeWarning`. The standard Python warning "
"categories are available as global variables whose names are ``PyExc_`` "
"followed by the Python exception name. These have the type :c:type:`PyObject"
"\\*`; they are all class objects. Their names are :c:data:`PyExc_Warning`, :"
"c:data:`PyExc_UserWarning`, :c:data:`PyExc_UnicodeWarning`, :c:data:"
"`PyExc_DeprecationWarning`, :c:data:`PyExc_SyntaxWarning`, :c:data:"
"`PyExc_RuntimeWarning`, and :c:data:`PyExc_FutureWarning`. :c:data:"
"`PyExc_Warning` is a subclass of :c:data:`PyExc_Exception`; the other "
"warning categories are subclasses of :c:data:`PyExc_Warning`."
msgstr ""
# 6673aa0b6b004dc9bb109cd2b5eb3930
#: ../src/Doc/c-api/exceptions.rst:300
msgid ""
"For information about warning control, see the documentation for the :mod:"
"`warnings` module and the :option:`-W` option in the command line "
"documentation. There is no C API for warning control."
msgstr ""
# 08b3491884314079a6a16fd2bf280973
#: ../src/Doc/c-api/exceptions.rst:307
msgid ""
"Issue a warning message. The *category* argument is a warning category (see "
"below) or *NULL*; the *message* argument is a message string. The warning "
"will appear to be issued from the function calling :c:func:`PyErr_Warn`, "
"equivalent to calling :c:func:`PyErr_WarnEx` with a *stacklevel* of 1."
msgstr ""
# 82f5df8efe6c4a6f91b1d65609426976
#: ../src/Doc/c-api/exceptions.rst:312
msgid "Deprecated; use :c:func:`PyErr_WarnEx` instead."
msgstr ""
# f78d79baa0da42f3a62610fd44a8847e
#: ../src/Doc/c-api/exceptions.rst:317
msgid ""
"Issue a warning message with explicit control over all warning attributes. "
"This is a straightforward wrapper around the Python function :func:`warnings."
"warn_explicit`, see there for more information. The *module* and *registry* "
"arguments may be set to *NULL* to get the default effect described there."
msgstr ""
# c369a55a5371425a813b663bfe25142c
#: ../src/Doc/c-api/exceptions.rst:326
msgid ""
"Issue a :exc:`DeprecationWarning` with the given *message* and *stacklevel* "
"if the :c:data:`Py_Py3kWarningFlag` flag is enabled."
msgstr ""
# 4df501d23c8b4e57af263e78e759adb0
#: ../src/Doc/c-api/exceptions.rst:339
msgid ""
"This function interacts with Python's signal handling. It checks whether a "
"signal has been sent to the processes and if so, invokes the corresponding "
"signal handler. If the :mod:`signal` module is supported, this can invoke a "
"signal handler written in Python. In all cases, the default effect for :"
"const:`SIGINT` is to raise the :exc:`KeyboardInterrupt` exception. If an "
"exception is raised the error indicator is set and the function returns "
"``-1``; otherwise the function returns ``0``. The error indicator may or "
"may not be cleared if it was previously set."
msgstr ""
# de4c1d62fb20434caf1d837d99b4ad00
#: ../src/Doc/c-api/exceptions.rst:355
msgid ""
"This function simulates the effect of a :const:`SIGINT` signal arriving --- "
"the next time :c:func:`PyErr_CheckSignals` is called, :exc:"
"`KeyboardInterrupt` will be raised. It may be called without holding the "
"interpreter lock."
msgstr ""
# 16e0cfc5392443c09c371c228c7907ae
#: ../src/Doc/c-api/exceptions.rst:365
msgid ""
"This utility function specifies a file descriptor to which a ``'\\0'`` byte "
"will be written whenever a signal is received. It returns the previous such "
"file descriptor. The value ``-1`` disables the feature; this is the initial "
"state. This is equivalent to :func:`signal.set_wakeup_fd` in Python, but "
"without any error checking. *fd* should be a valid file descriptor. The "
"function should only be called from the main thread."
msgstr ""
# 8ed8c70c1c9046628d0222ec7c3c0352
#: ../src/Doc/c-api/exceptions.rst:377
msgid ""
"This utility function creates and returns a new exception class. The *name* "
"argument must be the name of the new exception, a C string of the form "
"``module.classname``. The *base* and *dict* arguments are normally *NULL*. "
"This creates a class object derived from :exc:`Exception` (accessible in C "
"as :c:data:`PyExc_Exception`)."
msgstr ""
# f6d518adf9de4a92b9acdb7563a222c2
#: ../src/Doc/c-api/exceptions.rst:383
msgid ""
"The :attr:`__module__` attribute of the new class is set to the first part "
"(up to the last dot) of the *name* argument, and the class name is set to "
"the last part (after the last dot). The *base* argument can be used to "
"specify alternate base classes; it can either be only one class or a tuple "
"of classes. The *dict* argument can be used to specify a dictionary of class "
"variables and methods."
msgstr ""
# 5858a6c32ce64136a7ded55c90f7dc92
#: ../src/Doc/c-api/exceptions.rst:392
msgid ""
"Same as :c:func:`PyErr_NewException`, except that the new exception class "
"can easily be given a docstring: If *doc* is non-*NULL*, it will be used as "
"the docstring for the exception class."
msgstr ""
# 526743355b98486b9f1ab57e107550fc
#: ../src/Doc/c-api/exceptions.rst:401
msgid ""
"This utility function prints a warning message to ``sys.stderr`` when an "
"exception has been set but it is impossible for the interpreter to actually "
"raise the exception. It is used, for example, when an exception occurs in "
"an :meth:`__del__` method."
msgstr ""
# 26cf16a4fb454ae9ad33a3d0e70c7eb7
#: ../src/Doc/c-api/exceptions.rst:406
msgid ""
"The function is called with a single argument *obj* that identifies the "
"context in which the unraisable exception occurred. The repr of *obj* will "
"be printed in the warning message."
msgstr ""
#: ../src/Doc/c-api/exceptions.rst:414
#, fuzzy
msgid "Unicode Exception Objects"
msgstr "Objets Exception"
# 3068c11a474c45af958d3ddcab0cfa1d
#: ../src/Doc/c-api/exceptions.rst:416
msgid ""
"The following functions are used to create and modify Unicode exceptions "
"from C."
msgstr ""
# 79b350fef7ed442190d2a499ff34c47b
#: ../src/Doc/c-api/exceptions.rst:420
msgid ""
"Create a :class:`UnicodeDecodeError` object with the attributes *encoding*, "
"*object*, *length*, *start*, *end* and *reason*."
msgstr ""
# fbdb217438d3495a942e29fe091fa7fd
#: ../src/Doc/c-api/exceptions.rst:425
msgid ""
"Create a :class:`UnicodeEncodeError` object with the attributes *encoding*, "
"*object*, *length*, *start*, *end* and *reason*."
msgstr ""
# 0942689de5784065be6b86db1e56add0
#: ../src/Doc/c-api/exceptions.rst:430
msgid ""
"Create a :class:`UnicodeTranslateError` object with the attributes *object*, "
"*length*, *start*, *end* and *reason*."
msgstr ""
# 994cc120c2574b19944cfb3f987e1d3c
#: ../src/Doc/c-api/exceptions.rst:436
msgid "Return the *encoding* attribute of the given exception object."
msgstr ""
# 489c19d9bb4f4028ba28c1e66f94db24
#: ../src/Doc/c-api/exceptions.rst:442
msgid "Return the *object* attribute of the given exception object."
msgstr ""
# 80df25d746594aaf87bd55ba98a832b9
#: ../src/Doc/c-api/exceptions.rst:448
msgid ""
"Get the *start* attribute of the given exception object and place it into *"
"\\*start*. *start* must not be *NULL*. Return ``0`` on success, ``-1`` on "
"failure."
msgstr ""
# 1d5721002fe9429ba126994614cf77e4
#: ../src/Doc/c-api/exceptions.rst:456
msgid ""
"Set the *start* attribute of the given exception object to *start*. Return "
"``0`` on success, ``-1`` on failure."
msgstr ""
# e87b977cf27746668bbfd7490a3133c3
#: ../src/Doc/c-api/exceptions.rst:463
msgid ""
"Get the *end* attribute of the given exception object and place it into *"
"\\*end*. *end* must not be *NULL*. Return ``0`` on success, ``-1`` on "
"failure."
msgstr ""
# 8baec9193a0e416c951407367a9b91fc
#: ../src/Doc/c-api/exceptions.rst:471
msgid ""
"Set the *end* attribute of the given exception object to *end*. Return "
"``0`` on success, ``-1`` on failure."
msgstr ""
# 1c66a5d03a414394966ee3b8f17f3e92
#: ../src/Doc/c-api/exceptions.rst:478
msgid "Return the *reason* attribute of the given exception object."
msgstr ""
# a7b9a95fcf0d4fe0998dede225e3e965
#: ../src/Doc/c-api/exceptions.rst:484
msgid ""
"Set the *reason* attribute of the given exception object to *reason*. "
"Return ``0`` on success, ``-1`` on failure."
msgstr ""
#: ../src/Doc/c-api/exceptions.rst:489
msgid "Recursion Control"
msgstr "Contrôle de la récursion"
#: ../src/Doc/c-api/exceptions.rst:491
msgid ""
"These two functions provide a way to perform safe recursive calls at the C "
"level, both in the core and in extension modules. They are needed if the "
"recursive code does not necessarily invoke Python code (which tracks its "
"recursion depth automatically)."
msgstr ""
# 33ddb5e0606846ed9bb92137558dda5a
#: ../src/Doc/c-api/exceptions.rst:498
msgid "Marks a point where a recursive C-level call is about to be performed."
msgstr ""
# 7403de4bffbf47ffa168daa44fa2998e
#: ../src/Doc/c-api/exceptions.rst:500
msgid ""
"If :const:`USE_STACKCHECK` is defined, this function checks if the OS stack "
"overflowed using :c:func:`PyOS_CheckStack`. In this is the case, it sets a :"
"exc:`MemoryError` and returns a nonzero value."
msgstr ""
# e6798739bde447448b9ff135c09b755b
#: ../src/Doc/c-api/exceptions.rst:504
msgid ""
"The function then checks if the recursion limit is reached. If this is the "
"case, a :exc:`RuntimeError` is set and a nonzero value is returned. "
"Otherwise, zero is returned."
msgstr ""
# 4fa1b81ac88549858e678558c3abe76b
#: ../src/Doc/c-api/exceptions.rst:508
msgid ""
"*where* should be a string such as ``\" in instance check\"`` to be "
"concatenated to the :exc:`RuntimeError` message caused by the recursion "
"depth limit."
msgstr ""
# 892d13be55cf469faac6a27912389343
#: ../src/Doc/c-api/exceptions.rst:514
msgid ""
"Ends a :c:func:`Py_EnterRecursiveCall`. Must be called once for each "
"*successful* invocation of :c:func:`Py_EnterRecursiveCall`."
msgstr ""
#: ../src/Doc/c-api/exceptions.rst:521
msgid "Standard Exceptions"
msgstr "Exceptions standards"
# 1fe9a27ef5914f7e80c4b90204cf5865
#: ../src/Doc/c-api/exceptions.rst:523
msgid ""
"All standard Python exceptions are available as global variables whose names "
"are ``PyExc_`` followed by the Python exception name. These have the type :"
"c:type:`PyObject\\*`; they are all class objects. For completeness, here "
"are all the variables:"
msgstr ""
#: ../src/Doc/c-api/exceptions.rst:529
msgid "C Name"
msgstr "Nom C"
#: ../src/Doc/c-api/exceptions.rst:529
msgid "Python Name"
msgstr "Nom Python"
#: ../src/Doc/c-api/exceptions.rst:529
msgid "Notes"
msgstr "Notes"
#: ../src/Doc/c-api/exceptions.rst:531
msgid ":c:data:`PyExc_BaseException`"
msgstr ":c:data:`PyExc_BaseException`"
#: ../src/Doc/c-api/exceptions.rst:531
msgid ":exc:`BaseException`"
msgstr ":exc:`BaseException`"
# 31c707bae9f64037a3ab6f08eec71c60
#: ../src/Doc/c-api/exceptions.rst:531
msgid "(1), (4)"
msgstr ""
#: ../src/Doc/c-api/exceptions.rst:533
msgid ":c:data:`PyExc_Exception`"
msgstr ":c:data:`PyExc_Exception`"
#: ../src/Doc/c-api/exceptions.rst:533
msgid ":exc:`Exception`"
msgstr ":exc:`Exception`"
#: ../src/Doc/c-api/exceptions.rst:533 ../src/Doc/c-api/exceptions.rst:535
#: ../src/Doc/c-api/exceptions.rst:537 ../src/Doc/c-api/exceptions.rst:539
#: ../src/Doc/c-api/exceptions.rst:547
msgid "\\(1)"
msgstr "\\(1)"
#: ../src/Doc/c-api/exceptions.rst:535
msgid ":c:data:`PyExc_StandardError`"
msgstr ":c:data:`PyExc_StandardError`"
#: ../src/Doc/c-api/exceptions.rst:535
msgid ":exc:`StandardError`"
msgstr ":exc:`StandardError`"
#: ../src/Doc/c-api/exceptions.rst:537
msgid ":c:data:`PyExc_ArithmeticError`"
msgstr ":c:data:`PyExc_ArithmeticError`"
#: ../src/Doc/c-api/exceptions.rst:537
msgid ":exc:`ArithmeticError`"
msgstr ":exc:`ArithmeticError`"
#: ../src/Doc/c-api/exceptions.rst:539
msgid ":c:data:`PyExc_LookupError`"
msgstr ":c:data:`PyExc_LookupError`"
#: ../src/Doc/c-api/exceptions.rst:539
msgid ":exc:`LookupError`"
msgstr ":exc:`LookupError`"
#: ../src/Doc/c-api/exceptions.rst:541
msgid ":c:data:`PyExc_AssertionError`"
msgstr ":c:data:`PyExc_AssertionError`"
#: ../src/Doc/c-api/exceptions.rst:541
msgid ":exc:`AssertionError`"
msgstr ":exc:`AssertionError`"
#: ../src/Doc/c-api/exceptions.rst:543
msgid ":c:data:`PyExc_AttributeError`"
msgstr ":c:data:`PyExc_AttributeError`"
#: ../src/Doc/c-api/exceptions.rst:543
msgid ":exc:`AttributeError`"
msgstr ":exc:`AttributeError`"
#: ../src/Doc/c-api/exceptions.rst:545
msgid ":c:data:`PyExc_EOFError`"
msgstr ":c:data:`PyExc_EOFError`"
#: ../src/Doc/c-api/exceptions.rst:545
msgid ":exc:`EOFError`"
msgstr ":exc:`EOFError`"
#: ../src/Doc/c-api/exceptions.rst:547
msgid ":c:data:`PyExc_EnvironmentError`"
msgstr ":c:data:`PyExc_EnvironmentError`"
#: ../src/Doc/c-api/exceptions.rst:547
msgid ":exc:`EnvironmentError`"
msgstr ":exc:`EnvironmentError`"
#: ../src/Doc/c-api/exceptions.rst:549
msgid ":c:data:`PyExc_FloatingPointError`"
msgstr ":c:data:`PyExc_FloatingPointError`"
#: ../src/Doc/c-api/exceptions.rst:549
msgid ":exc:`FloatingPointError`"
msgstr ":exc:`FloatingPointError`"
#: ../src/Doc/c-api/exceptions.rst:551
msgid ":c:data:`PyExc_IOError`"
msgstr ":c:data:`PyExc_IOError`"
#: ../src/Doc/c-api/exceptions.rst:551
msgid ":exc:`IOError`"
msgstr ":exc:`IOError`"
#: ../src/Doc/c-api/exceptions.rst:553
msgid ":c:data:`PyExc_ImportError`"
msgstr ":c:data:`PyExc_ImportError`"
#: ../src/Doc/c-api/exceptions.rst:553
msgid ":exc:`ImportError`"
msgstr ":exc:`ImportError`"
#: ../src/Doc/c-api/exceptions.rst:555
#, fuzzy
msgid ":c:data:`PyExc_IndexError`"
msgstr ":c:data:`PyExc_IndexError`"
#: ../src/Doc/c-api/exceptions.rst:555
msgid ":exc:`IndexError`"
msgstr ":exc:`IndexError`"
#: ../src/Doc/c-api/exceptions.rst:557
#, fuzzy
msgid ":c:data:`PyExc_KeyError`"
msgstr ":c:data:`PyExc_KeyError`"
#: ../src/Doc/c-api/exceptions.rst:557
msgid ":exc:`KeyError`"
msgstr ":exc:`KeyError`"
#: ../src/Doc/c-api/exceptions.rst:559
#, fuzzy
msgid ":c:data:`PyExc_KeyboardInterrupt`"
msgstr ":c:data:`PyExc_KeyboardInterrupt`"
#: ../src/Doc/c-api/exceptions.rst:559
msgid ":exc:`KeyboardInterrupt`"
msgstr ":exc:`KeyboardInterrupt`"
#: ../src/Doc/c-api/exceptions.rst:561
#, fuzzy
msgid ":c:data:`PyExc_MemoryError`"
msgstr ":c:data:`PyExc_MemoryError`"
#: ../src/Doc/c-api/exceptions.rst:561
msgid ":exc:`MemoryError`"
msgstr ":exc:`MemoryError`"
#: ../src/Doc/c-api/exceptions.rst:563
#, fuzzy
msgid ":c:data:`PyExc_NameError`"
msgstr ":c:data:`PyExc_NameError`"
#: ../src/Doc/c-api/exceptions.rst:563
msgid ":exc:`NameError`"
msgstr ":exc:`NameError`"
#: ../src/Doc/c-api/exceptions.rst:565
#, fuzzy
msgid ":c:data:`PyExc_NotImplementedError`"
msgstr ":c:data:`PyExc_NotImplementedError`"
#: ../src/Doc/c-api/exceptions.rst:565
msgid ":exc:`NotImplementedError`"
msgstr ":exc:`NotImplementedError`"
#: ../src/Doc/c-api/exceptions.rst:567
#, fuzzy
msgid ":c:data:`PyExc_OSError`"
msgstr ":c:data:`PyExc_OSError`"
#: ../src/Doc/c-api/exceptions.rst:567
msgid ":exc:`OSError`"
msgstr ":exc:`OSError`"
#: ../src/Doc/c-api/exceptions.rst:569
#, fuzzy
msgid ":c:data:`PyExc_OverflowError`"
msgstr ":c:data:`PyExc_OverflowError`"
#: ../src/Doc/c-api/exceptions.rst:569
msgid ":exc:`OverflowError`"
msgstr ":exc:`OverflowError`"
#: ../src/Doc/c-api/exceptions.rst:571
#, fuzzy
msgid ":c:data:`PyExc_ReferenceError`"
msgstr ":c:data:`PyExc_ReferenceError`"
#: ../src/Doc/c-api/exceptions.rst:571
msgid ":exc:`ReferenceError`"
msgstr ":exc:`ReferenceError`"
#: ../src/Doc/c-api/exceptions.rst:571
msgid "\\(2)"
msgstr "\\(2)"
#: ../src/Doc/c-api/exceptions.rst:573
msgid ":c:data:`PyExc_RuntimeError`"
msgstr ":c:data:`PyExc_RuntimeError`"
#: ../src/Doc/c-api/exceptions.rst:573
msgid ":exc:`RuntimeError`"
msgstr ":exc:`RuntimeError`"
#: ../src/Doc/c-api/exceptions.rst:575
#, fuzzy
msgid ":c:data:`PyExc_SyntaxError`"
msgstr ":c:data:`PyExc_SyntaxError`"
#: ../src/Doc/c-api/exceptions.rst:575
msgid ":exc:`SyntaxError`"
msgstr ":exc:`SyntaxError`"
#: ../src/Doc/c-api/exceptions.rst:577
msgid ":c:data:`PyExc_SystemError`"
msgstr ":c:data:`PyExc_SystemError`"
#: ../src/Doc/c-api/exceptions.rst:577
msgid ":exc:`SystemError`"
msgstr ":exc:`SystemError`"
#: ../src/Doc/c-api/exceptions.rst:579
msgid ":c:data:`PyExc_SystemExit`"
msgstr ":c:data:`PyExc_SystemExit`"
#: ../src/Doc/c-api/exceptions.rst:579
msgid ":exc:`SystemExit`"
msgstr ":exc:`SystemExit`"
#: ../src/Doc/c-api/exceptions.rst:581
msgid ":c:data:`PyExc_TypeError`"
msgstr ":c:data:`PyExc_TypeError`"
#: ../src/Doc/c-api/exceptions.rst:581
msgid ":exc:`TypeError`"
msgstr ":exc:`TypeError`"
#: ../src/Doc/c-api/exceptions.rst:583
msgid ":c:data:`PyExc_ValueError`"
msgstr ":c:data:`PyExc_ValueError`"
#: ../src/Doc/c-api/exceptions.rst:583
msgid ":exc:`ValueError`"
msgstr ":exc:`ValueError`"
#: ../src/Doc/c-api/exceptions.rst:585
msgid ":c:data:`PyExc_WindowsError`"
msgstr ":c:data:`PyExc_WindowsError`"
#: ../src/Doc/c-api/exceptions.rst:585
msgid ":exc:`WindowsError`"
msgstr ":exc:`WindowsError`"
#: ../src/Doc/c-api/exceptions.rst:585
msgid "\\(3)"
msgstr "\\(3)"
#: ../src/Doc/c-api/exceptions.rst:587
msgid ":c:data:`PyExc_ZeroDivisionError`"
msgstr ":c:data:`PyExc_ZeroDivisionError`"
#: ../src/Doc/c-api/exceptions.rst:587
msgid ":exc:`ZeroDivisionError`"
msgstr ":exc:`ZeroDivisionError`"
#: ../src/Doc/c-api/exceptions.rst:621
msgid "Notes:"
msgstr "Notes : "
#: ../src/Doc/c-api/exceptions.rst:624
msgid "This is a base class for other standard exceptions."
msgstr "C'est la classe de base pour les autres exceptions standards"
#: ../src/Doc/c-api/exceptions.rst:627
msgid "This is the same as :exc:`weakref.ReferenceError`."
msgstr "Identique à :exc:`weakref.ReferenceError`."
#: ../src/Doc/c-api/exceptions.rst:630
msgid ""
"Only defined on Windows; protect code that uses this by testing that the "
"preprocessor macro ``MS_WINDOWS`` is defined."
msgstr ""
#: ../src/Doc/c-api/exceptions.rst:638
msgid "String Exceptions"
msgstr ""
#: ../src/Doc/c-api/file.rst:6
msgid "File Objects"
msgstr "Objets fichiers"
# 855f2f1e54214254990840f446e17fd3
#: ../src/Doc/c-api/file.rst:10
msgid ""
"Python's built-in file objects are implemented entirely on the :c:type:`FILE"
"\\*` support from the C standard library. This is an implementation detail "
"and may change in future releases of Python."
msgstr ""
# 3ebcfbdec8b14fd0aa3f82e3e274b7b1
#: ../src/Doc/c-api/file.rst:17
msgid "This subtype of :c:type:`PyObject` represents a Python file object."
msgstr ""
# c8bf8e0de5b748e586fe373b40101c0e
#: ../src/Doc/c-api/file.rst:24
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python file type. "
"This is exposed to Python programs as ``file`` and ``types.FileType``."
msgstr ""
# c589e65e50cf403a906b10f7683fecff
#: ../src/Doc/c-api/file.rst:30
msgid ""
"Return true if its argument is a :c:type:`PyFileObject` or a subtype of :c:"
"type:`PyFileObject`."
msgstr ""
# 64dad6d3f5474aa995303ad2f7d5ec7c
#: ../src/Doc/c-api/file.rst:39
msgid ""
"Return true if its argument is a :c:type:`PyFileObject`, but not a subtype "
"of :c:type:`PyFileObject`."
msgstr ""
# b94d6b32c3004dadbba60954747550aa
#: ../src/Doc/c-api/file.rst:49
msgid ""
"On success, return a new file object that is opened on the file given by "
"*filename*, with a file mode given by *mode*, where *mode* has the same "
"semantics as the standard C routine :c:func:`fopen`. On failure, return "
"*NULL*."
msgstr ""
# 68142d8b894148c9bb6f0a7e06c0512e
#: ../src/Doc/c-api/file.rst:56
msgid ""
"Create a new :c:type:`PyFileObject` from the already-open standard C file "
"pointer, *fp*. The function *close* will be called when the file should be "
"closed. Return *NULL* and close the file using *close* on failure. *close* "
"is optional and can be set to *NULL*."
msgstr ""
# 3ce48a19f980476da9da6d70056ac957
#: ../src/Doc/c-api/file.rst:64
msgid "Return the file object associated with *p* as a :c:type:`FILE\\*`."
msgstr ""
# 329ce35439ce478a884be0be17e6cf68
#: ../src/Doc/c-api/file.rst:66
msgid ""
"If the caller will ever use the returned :c:type:`FILE\\*` object while the :"
"term:`GIL` is released it must also call the :c:func:`PyFile_IncUseCount` "
"and :c:func:`PyFile_DecUseCount` functions described below as appropriate."
msgstr ""
# b009e85b8e0346bca89cb4e381068f9b
#: ../src/Doc/c-api/file.rst:73
msgid ""
"Increments the PyFileObject's internal use count to indicate that the "
"underlying :c:type:`FILE\\*` is being used. This prevents Python from "
"calling f_close() on it from another thread. Callers of this must call :c:"
"func:`PyFile_DecUseCount` when they are finished with the :c:type:`FILE"
"\\*`. Otherwise the file object will never be closed by Python."
msgstr ""
# 8b88969e03c349d78bcb48bb31ed9198
#: ../src/Doc/c-api/file.rst:80
msgid "The :term:`GIL` must be held while calling this function."
msgstr ""
# 061fc65b1e23406482c14c4c8dce9963
#: ../src/Doc/c-api/file.rst:82
msgid ""
"The suggested use is to call this after :c:func:`PyFile_AsFile` and before "
"you release the GIL::"
msgstr ""
# 0b524854c5fe419c9adbbc7b0223f84a
#: ../src/Doc/c-api/file.rst:99
msgid ""
"Decrements the PyFileObject's internal unlocked_count member to indicate "
"that the caller is done with its own use of the :c:type:`FILE\\*`. This may "
"only be called to undo a prior call to :c:func:`PyFile_IncUseCount`."
msgstr ""
# c41010a6ca1a443d9439deeedb3119aa
#: ../src/Doc/c-api/file.rst:103
msgid ""
"The :term:`GIL` must be held while calling this function (see the example "
"above)."
msgstr ""
# 0232558ecba24837b6e7af069589f01a
#: ../src/Doc/c-api/file.rst:113
msgid ""
"Equivalent to ``p.readline([n])``, this function reads one line from the "
"object *p*. *p* may be a file object or any object with a :meth:`~io.IOBase."
"readline` method. If *n* is ``0``, exactly one line is read, regardless of "
"the length of the line. If *n* is greater than ``0``, no more than *n* "
"bytes will be read from the file; a partial line can be returned. In both "
"cases, an empty string is returned if the end of the file is reached "
"immediately. If *n* is less than ``0``, however, one line is read "
"regardless of length, but :exc:`EOFError` is raised if the end of the file "
"is reached immediately."
msgstr ""
# 1bef0003fae341838f361176039f4bf6
#: ../src/Doc/c-api/file.rst:126
msgid "Return the name of the file specified by *p* as a string object."
msgstr ""
# f6b57a642018412cb393efb4d85f8c21
#: ../src/Doc/c-api/file.rst:133
msgid ""
"Available on systems with :c:func:`setvbuf` only. This should only be "
"called immediately after file object creation."
msgstr ""
# 0810bc095aa44245bf50741420508fb5
#: ../src/Doc/c-api/file.rst:139
msgid ""
"Set the file's encoding for Unicode output to *enc*. Return 1 on success and "
"0 on failure."
msgstr ""
# 1d8dd1f31e7a49809c5e9b7aadfed146
#: ../src/Doc/c-api/file.rst:147
msgid ""
"Set the file's encoding for Unicode output to *enc*, and its error mode to "
"*err*. Return 1 on success and 0 on failure."
msgstr ""
# df36519e6af84411b18d55d9ed49bc37
#: ../src/Doc/c-api/file.rst:157
msgid ""
"This function exists for internal use by the interpreter. Set the :attr:"
"`softspace` attribute of *p* to *newflag* and return the previous value. *p* "
"does not have to be a file object for this function to work properly; any "
"object is supported (thought its only interesting if the :attr:`softspace` "
"attribute can be set). This function clears any errors, and will return "
"``0`` as the previous value if the attribute either does not exist or if "
"there were errors in retrieving it. There is no way to detect errors from "
"this function, but doing so should not be needed."
msgstr ""
# 69cefba0f77e43ca90410f62056e5580
#: ../src/Doc/c-api/file.rst:171
msgid ""
"Write object *obj* to file object *p*. The only supported flag for *flags* "
"is :const:`Py_PRINT_RAW`; if given, the :func:`str` of the object is written "
"instead of the :func:`repr`. Return ``0`` on success or ``-1`` on failure; "
"the appropriate exception will be set."
msgstr ""
# 4551ee45b5a04e5c9a65ec5087efe225
#: ../src/Doc/c-api/file.rst:179
msgid ""
"Write string *s* to file object *p*. Return ``0`` on success or ``-1`` on "
"failure; the appropriate exception will be set."
msgstr ""
#: ../src/Doc/c-api/float.rst:6
msgid "Floating Point Objects"
msgstr ""
# d1869e7d55f945d1af5bac4008a8ac10
#: ../src/Doc/c-api/float.rst:13
msgid ""
"This subtype of :c:type:`PyObject` represents a Python floating point object."
msgstr ""
# 8007abbb8b104a5a959918d35e65ff05
#: ../src/Doc/c-api/float.rst:20
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python floating point "
"type. This is the same object as ``float`` and ``types.FloatType``."
msgstr ""
# 95c9e3bd73d04f75b5bb8abf94c497f0
#: ../src/Doc/c-api/float.rst:26
msgid ""
"Return true if its argument is a :c:type:`PyFloatObject` or a subtype of :c:"
"type:`PyFloatObject`."
msgstr ""
# 00368846c207433cbb5d80debcbdb5a1
#: ../src/Doc/c-api/float.rst:35
msgid ""
"Return true if its argument is a :c:type:`PyFloatObject`, but not a subtype "
"of :c:type:`PyFloatObject`."
msgstr ""
# b437c0361bd54164910027c19b5bc972
#: ../src/Doc/c-api/float.rst:43
msgid ""
"Create a :c:type:`PyFloatObject` object based on the string value in *str*, "
"or *NULL* on failure. The *pend* argument is ignored. It remains only for "
"backward compatibility."
msgstr ""
# 66f65d13be074e5cb155459b32e7c7e5
#: ../src/Doc/c-api/float.rst:50
msgid "Create a :c:type:`PyFloatObject` object from *v*, or *NULL* on failure."
msgstr ""
# 7770787e5ff8412b9bcc081501e1d626
#: ../src/Doc/c-api/float.rst:55
msgid ""
"Return a C :c:type:`double` representation of the contents of *pyfloat*. If "
"*pyfloat* is not a Python floating point object but has a :meth:`__float__` "
"method, this method will first be called to convert *pyfloat* into a float. "
"This method returns ``-1.0`` upon failure, so one should call :c:func:"
"`PyErr_Occurred` to check for errors."
msgstr ""
# b3e146c025504fdab11f3672b774c011
#: ../src/Doc/c-api/float.rst:64
msgid ""
"Return a C :c:type:`double` representation of the contents of *pyfloat*, but "
"without error checking."
msgstr ""
# 8ab7b10a3e0944e19bb905d2a979c61c
#: ../src/Doc/c-api/float.rst:70
msgid ""
"Return a structseq instance which contains information about the precision, "
"minimum and maximum values of a float. It's a thin wrapper around the header "
"file :file:`float.h`."
msgstr ""
# 9e3449653e2e4a89865ce5e27e146cb6
#: ../src/Doc/c-api/float.rst:79
msgid ""
"Return the maximum representable finite float *DBL_MAX* as C :c:type:"
"`double`."
msgstr ""
# 9435c6f59a8543c5a3136baacdb01c8a
#: ../src/Doc/c-api/float.rst:86
msgid ""
"Return the minimum normalized positive float *DBL_MIN* as C :c:type:`double`."
msgstr ""
# fc6ff06e23754820ab4cc725edba2e80
#: ../src/Doc/c-api/float.rst:93
msgid ""
"Clear the float free list. Return the number of items that could not be "
"freed."
msgstr ""
# fa08dc157b624326b229ddd2705657f5
#: ../src/Doc/c-api/float.rst:101
msgid ""
"Convert the argument *v* to a string, using the same rules as :func:`str`. "
"The length of *buf* should be at least 100."
msgstr ""
# 26a7870012b844d08bd283618f547178
# 9de892e27d6c4adcbfee0d243303d598
#: ../src/Doc/c-api/float.rst:104 ../src/Doc/c-api/float.rst:116
msgid ""
"This function is unsafe to call because it writes to a buffer whose length "
"it does not know."
msgstr ""
# 62eb25960db94643b08e6eaf02ac992c
#: ../src/Doc/c-api/float.rst:113
msgid ""
"Same as PyFloat_AsString, except uses the same rules as :func:`repr`. The "
"length of *buf* should be at least 100."
msgstr ""
#: ../src/Doc/c-api/function.rst:6
msgid "Function Objects"
msgstr ""
#: ../src/Doc/c-api/function.rst:10
msgid "There are a few functions specific to Python functions."
msgstr ""
# ecd4bc0f2fe44577b3d7065e187ba740
#: ../src/Doc/c-api/function.rst:15
msgid "The C structure used for functions."
msgstr ""
# 220827c38c404678bc2b136ae80ac97f
#: ../src/Doc/c-api/function.rst:22
msgid ""
"This is an instance of :c:type:`PyTypeObject` and represents the Python "
"function type. It is exposed to Python programmers as ``types."
"FunctionType``."
msgstr ""
# ee842a4ef6f848658be9c650a497e5de
#: ../src/Doc/c-api/function.rst:28
msgid ""
"Return true if *o* is a function object (has type :c:data:"
"`PyFunction_Type`). The parameter must not be *NULL*."
msgstr ""
# aa80affddd2448cebf034ea571452eed
#: ../src/Doc/c-api/function.rst:34
msgid ""
"Return a new function object associated with the code object *code*. "
"*globals* must be a dictionary with the global variables accessible to the "
"function."
msgstr ""
# 1f15320a78f443e28420325974290fed
#: ../src/Doc/c-api/function.rst:37
msgid ""
"The function's docstring, name and *__module__* are retrieved from the code "
"object, the argument defaults and closure are set to *NULL*."
msgstr ""
# e3520be368034f82981f9a77ed2912be
#: ../src/Doc/c-api/function.rst:43
msgid "Return the code object associated with the function object *op*."
msgstr ""
# 88fb240de7ae4f6dadd18d1745eb4843
#: ../src/Doc/c-api/function.rst:48
msgid "Return the globals dictionary associated with the function object *op*."
msgstr ""
# dd82490874b84ac583259211eb4854d4
#: ../src/Doc/c-api/function.rst:53
msgid ""
"Return the *__module__* attribute of the function object *op*. This is "
"normally a string containing the module name, but can be set to any other "
"object by Python code."
msgstr ""
# 8f853d6f2eb943e3999ca5e730f93fe5
#: ../src/Doc/c-api/function.rst:60
msgid ""
"Return the argument default values of the function object *op*. This can be "
"a tuple of arguments or *NULL*."
msgstr ""
# d3a13ca1358e4f49b476a84baa14990a
#: ../src/Doc/c-api/function.rst:66
msgid ""
"Set the argument default values for the function object *op*. *defaults* "
"must be *Py_None* or a tuple."
msgstr ""
# 8b46c4ae82e740af9e7421bdf4e557a3
# 9c48cabcf44942559156a036d63ffae4
#: ../src/Doc/c-api/function.rst:69 ../src/Doc/c-api/function.rst:83
msgid "Raises :exc:`SystemError` and returns ``-1`` on failure."
msgstr ""
# 2c5240d989af478db4bffe644223d694
#: ../src/Doc/c-api/function.rst:74
msgid ""
"Return the closure associated with the function object *op*. This can be "
"*NULL* or a tuple of cell objects."
msgstr ""
# 9bc741be67934c5ab79b7c4c63341099
#: ../src/Doc/c-api/function.rst:80
msgid ""
"Set the closure associated with the function object *op*. *closure* must be "
"*Py_None* or a tuple of cell objects."
msgstr ""
#: ../src/Doc/c-api/gcsupport.rst:6
msgid "Supporting Cyclic Garbage Collection"
msgstr ""
#: ../src/Doc/c-api/gcsupport.rst:8
msgid ""
"Python's support for detecting and collecting garbage which involves "
"circular references requires support from object types which are \"containers"
"\" for other objects which may also be containers. Types which do not store "
"references to other objects, or which only store references to atomic types "
"(such as numbers or strings), do not need to provide any explicit support "
"for garbage collection."
msgstr ""
# 1edfa2df4afd476c9f491817647d1547
#: ../src/Doc/c-api/gcsupport.rst:18
msgid ""
"To create a container type, the :c:member:`~PyTypeObject.tp_flags` field of "
"the type object must include the :const:`Py_TPFLAGS_HAVE_GC` and provide an "
"implementation of the :c:member:`~PyTypeObject.tp_traverse` handler. If "
"instances of the type are mutable, a :c:member:`~PyTypeObject.tp_clear` "
"implementation must also be provided."
msgstr ""
#: ../src/Doc/c-api/gcsupport.rst:27
msgid ""
"Objects with a type with this flag set must conform with the rules "
"documented here. For convenience these objects will be referred to as "
"container objects."
msgstr ""
#: ../src/Doc/c-api/gcsupport.rst:31
msgid "Constructors for container types must conform to two rules:"
msgstr ""
# 280a8250f41548dcbc4e627aaa5ff1b0
#: ../src/Doc/c-api/gcsupport.rst:33
msgid ""
"The memory for the object must be allocated using :c:func:`PyObject_GC_New` "
"or :c:func:`PyObject_GC_NewVar`."
msgstr ""
# d7cf5f0b60f747439095f868ac201d0c
#: ../src/Doc/c-api/gcsupport.rst:36
msgid ""
"Once all the fields which may contain references to other containers are "
"initialized, it must call :c:func:`PyObject_GC_Track`."
msgstr ""
# 30336de35da942449315b69e07749a97
#: ../src/Doc/c-api/gcsupport.rst:42
msgid ""
"Analogous to :c:func:`PyObject_New` but for container objects with the :"
"const:`Py_TPFLAGS_HAVE_GC` flag set."
msgstr ""
# 2c7e79c053384ae39c7a31fe09bd9b5a
#: ../src/Doc/c-api/gcsupport.rst:48
msgid ""
"Analogous to :c:func:`PyObject_NewVar` but for container objects with the :"
"const:`Py_TPFLAGS_HAVE_GC` flag set."
msgstr ""
# e58632ba85b6469db76080bc72870348
#: ../src/Doc/c-api/gcsupport.rst:58
msgid ""
"Resize an object allocated by :c:func:`PyObject_NewVar`. Returns the "
"resized object or *NULL* on failure."
msgstr ""
# 62ac4f27781d4f019708bf1c6dfb1f57
#: ../src/Doc/c-api/gcsupport.rst:68
msgid ""
"Adds the object *op* to the set of container objects tracked by the "
"collector. The collector can run at unexpected times so objects must be "
"valid while being tracked. This should be called once all the fields "
"followed by the :c:member:`~PyTypeObject.tp_traverse` handler become valid, "
"usually near the end of the constructor."
msgstr ""
# 463de6236e2a438f99df9962ea5c29f0
#: ../src/Doc/c-api/gcsupport.rst:77
msgid ""
"A macro version of :c:func:`PyObject_GC_Track`. It should not be used for "
"extension modules."
msgstr ""
#: ../src/Doc/c-api/gcsupport.rst:80
msgid ""
"Similarly, the deallocator for the object must conform to a similar pair of "
"rules:"
msgstr ""
# d1e07004144b4afea4d0c9da2865098f
#: ../src/Doc/c-api/gcsupport.rst:83
msgid ""
"Before fields which refer to other containers are invalidated, :c:func:"
"`PyObject_GC_UnTrack` must be called."
msgstr ""
# c2e2423c09fe4243b8d4b00ef6cbdc71
#: ../src/Doc/c-api/gcsupport.rst:86
msgid ""
"The object's memory must be deallocated using :c:func:`PyObject_GC_Del`."
msgstr ""
# d65ffd8f236c41d59c1a6fa32932320a
#: ../src/Doc/c-api/gcsupport.rst:91
msgid ""
"Releases memory allocated to an object using :c:func:`PyObject_GC_New` or :c:"
"func:`PyObject_GC_NewVar`."
msgstr ""
# 308c96b086af4a4fb7382ddecda49dbc
#: ../src/Doc/c-api/gcsupport.rst:97
msgid ""
"Remove the object *op* from the set of container objects tracked by the "
"collector. Note that :c:func:`PyObject_GC_Track` can be called again on "
"this object to add it back to the set of tracked objects. The deallocator (:"
"c:member:`~PyTypeObject.tp_dealloc` handler) should call this for the object "
"before any of the fields used by the :c:member:`~PyTypeObject.tp_traverse` "
"handler become invalid."
msgstr ""
# 9aa66b523fd7496bb2516d90a6faebff
#: ../src/Doc/c-api/gcsupport.rst:106
msgid ""
"A macro version of :c:func:`PyObject_GC_UnTrack`. It should not be used for "
"extension modules."
msgstr ""
# 56cc59f0697d4af7ac54d409e6d4589b
#: ../src/Doc/c-api/gcsupport.rst:109
msgid ""
"The :c:member:`~PyTypeObject.tp_traverse` handler accepts a function "
"parameter of this type:"
msgstr ""
# ec4e7c76955848c38c822508f655e344
#: ../src/Doc/c-api/gcsupport.rst:114
msgid ""
"Type of the visitor function passed to the :c:member:`~PyTypeObject."
"tp_traverse` handler. The function should be called with an object to "
"traverse as *object* and the third parameter to the :c:member:`~PyTypeObject."
"tp_traverse` handler as *arg*. The Python core uses several visitor "
"functions to implement cyclic garbage detection; it's not expected that "
"users will need to write their own visitor functions."
msgstr ""
# 4577b81c7750441695dc6dd92b0330ff
#: ../src/Doc/c-api/gcsupport.rst:121
msgid ""
"The :c:member:`~PyTypeObject.tp_traverse` handler must have the following "
"type:"
msgstr ""
# b75ca9dec8064d55bf2c94c76f287770
#: ../src/Doc/c-api/gcsupport.rst:126
msgid ""
"Traversal function for a container object. Implementations must call the "
"*visit* function for each object directly contained by *self*, with the "
"parameters to *visit* being the contained object and the *arg* value passed "
"to the handler. The *visit* function must not be called with a *NULL* "
"object argument. If *visit* returns a non-zero value that value should be "
"returned immediately."
msgstr ""
# 5f9da0be74594dd2952f02ec24f0c906
#: ../src/Doc/c-api/gcsupport.rst:133
msgid ""
"To simplify writing :c:member:`~PyTypeObject.tp_traverse` handlers, a :c:"
"func:`Py_VISIT` macro is provided. In order to use this macro, the :c:"
"member:`~PyTypeObject.tp_traverse` implementation must name its arguments "
"exactly *visit* and *arg*:"
msgstr ""
# fdbcdbd60fff489fb8ab51ade52ad6c6
#: ../src/Doc/c-api/gcsupport.rst:140
msgid ""
"Call the *visit* callback, with arguments *o* and *arg*. If *visit* returns "
"a non-zero value, then return it. Using this macro, :c:member:"
"`~PyTypeObject.tp_traverse` handlers look like::"
msgstr ""
# 59157513a429409fb210a6097f6bbf04
#: ../src/Doc/c-api/gcsupport.rst:154
msgid ""
"The :c:member:`~PyTypeObject.tp_clear` handler must be of the :c:type:"
"`inquiry` type, or *NULL* if the object is immutable."
msgstr ""
# 48c6e050579f4969897f49d820d28d77
#: ../src/Doc/c-api/gcsupport.rst:160
msgid ""
"Drop references that may have created reference cycles. Immutable objects "
"do not have to define this method since they can never directly create "
"reference cycles. Note that the object must still be valid after calling "
"this method (don't just call :c:func:`Py_DECREF` on a reference). The "
"collector will call this method if it detects that this object is involved "
"in a reference cycle."
msgstr ""
#: ../src/Doc/c-api/gen.rst:6
msgid "Generator Objects"
msgstr ""
# 319c7c45d96740cab9efbbf4a6a51e00
#: ../src/Doc/c-api/gen.rst:8
msgid ""
"Generator objects are what Python uses to implement generator iterators. "
"They are normally created by iterating over a function that yields values, "
"rather than explicitly calling :c:func:`PyGen_New`."
msgstr ""
# f17f9d78afef41bf95d493f7adc143e1
#: ../src/Doc/c-api/gen.rst:15
msgid "The C structure used for generator objects."
msgstr ""
# 4af1d852708646c68827d7b99eaff5a3
#: ../src/Doc/c-api/gen.rst:20
msgid "The type object corresponding to generator objects"
msgstr ""
# df4ab5874c3a43ef942d374a3078fc7e
#: ../src/Doc/c-api/gen.rst:25
msgid "Return true if *ob* is a generator object; *ob* must not be *NULL*."
msgstr ""
# 55345bdeb1e748c398c668203a58c6f9
#: ../src/Doc/c-api/gen.rst:30
msgid ""
"Return true if *ob*'s type is *PyGen_Type* is a generator object; *ob* must "
"not be *NULL*."
msgstr ""
# 699ac2bd14ec4371b9f224ab2e13c5dd
#: ../src/Doc/c-api/gen.rst:36
msgid ""
"Create and return a new generator object based on the *frame* object. A "
"reference to *frame* is stolen by this function. The parameter must not be "
"*NULL*."
msgstr ""
#: ../src/Doc/c-api/import.rst:6
msgid "Importing Modules"
msgstr ""
# a01f64d6f7b24d2d92fd6ce79cc1879c
#: ../src/Doc/c-api/import.rst:16
msgid ""
"This is a simplified interface to :c:func:`PyImport_ImportModuleEx` below, "
"leaving the *globals* and *locals* arguments set to *NULL* and *level* set "
"to 0. When the *name* argument contains a dot (when it specifies a "
"submodule of a package), the *fromlist* argument is set to the list "
"``['*']`` so that the return value is the named module rather than the top-"
"level package containing it as would otherwise be the case. (Unfortunately, "
"this has an additional side effect when *name* in fact specifies a "
"subpackage instead of a submodule: the submodules specified in the package's "
"``__all__`` variable are loaded.) Return a new reference to the imported "
"module, or *NULL* with an exception set on failure. Before Python 2.4, the "
"module may still be created in the failure case --- examine ``sys.modules`` "
"to find out. Starting with Python 2.4, a failing import of a module no "
"longer leaves the module in ``sys.modules``."
msgstr ""
# 8ce27447a76d4cd99b30443863a977af
#: ../src/Doc/c-api/import.rst:39
msgid ""
"This version of :c:func:`PyImport_ImportModule` does not block. It's "
"intended to be used in C functions that import other modules to execute a "
"function. The import may block if another thread holds the import lock. The "
"function :c:func:`PyImport_ImportModuleNoBlock` never blocks. It first tries "
"to fetch the module from sys.modules and falls back to :c:func:"
"`PyImport_ImportModule` unless the lock is held, in which case the function "
"will raise an :exc:`ImportError`."
msgstr ""
# 00ae29922fcc47aa8ba55a16501928d9
# 6cac3a35de3b47a2aafd742460aba23a
#: ../src/Doc/c-api/import.rst:54 ../src/Doc/c-api/import.rst:74
msgid ""
"Import a module. This is best described by referring to the built-in Python "
"function :func:`__import__`, as the standard :func:`__import__` function "
"calls this function directly."
msgstr ""
# 2bf5377bc2844abb91200cd907c2b305
#: ../src/Doc/c-api/import.rst:58
msgid ""
"The return value is a new reference to the imported module or top-level "
"package, or *NULL* with an exception set on failure (before Python 2.4, the "
"module may still be created in this case). Like for :func:`__import__`, the "
"return value when a submodule of a package was requested is normally the top-"
"level package, unless a non-empty *fromlist* was given."
msgstr ""
# 08291ccba6d04ee49a48d314d553d830
#: ../src/Doc/c-api/import.rst:78
msgid ""
"The return value is a new reference to the imported module or top-level "
"package, or *NULL* with an exception set on failure. Like for :func:"
"`__import__`, the return value when a submodule of a package was requested "
"is normally the top-level package, unless a non-empty *fromlist* was given."
msgstr ""
# 38a6db984f5d4489b274dae3f658dc3c
#: ../src/Doc/c-api/import.rst:92
msgid ""
"This is a higher-level interface that calls the current \"import hook "
"function\". It invokes the :func:`__import__` function from the "
"``__builtins__`` of the current globals. This means that the import is done "
"using whatever import hooks are installed in the current environment, e.g. "
"by :mod:`rexec` or :mod:`ihooks`."
msgstr ""
# 9ba069c9d65b4e2aa5573d23cc8d2aff
#: ../src/Doc/c-api/import.rst:105
msgid ""
"Reload a module. This is best described by referring to the built-in Python "
"function :func:`reload`, as the standard :func:`reload` function calls this "
"function directly. Return a new reference to the reloaded module, or *NULL* "
"with an exception set on failure (the module still exists in this case)."
msgstr ""
# 9b55d21bb44a481c98ee176daf5d72f7
#: ../src/Doc/c-api/import.rst:113
msgid ""
"Return the module object corresponding to a module name. The *name* "
"argument may be of the form ``package.module``. First check the modules "
"dictionary if there's one there, and if not, create a new one and insert it "
"in the modules dictionary. Return *NULL* with an exception set on failure."
msgstr ""
# 35e76454a8874d77a5b0f1be96f908dc
#: ../src/Doc/c-api/import.rst:120
msgid ""
"This function does not load or import the module; if the module wasn't "
"already loaded, you will get an empty module object. Use :c:func:"
"`PyImport_ImportModule` or one of its variants to import a module. Package "
"structures implied by a dotted name for *name* are not created if not "
"already present."
msgstr ""
# 5a90bee5616e4497b9b77dfe74a56eae
#: ../src/Doc/c-api/import.rst:130
msgid ""
"Given a module name (possibly of the form ``package.module``) and a code "
"object read from a Python bytecode file or obtained from the built-in "
"function :func:`compile`, load the module. Return a new reference to the "
"module object, or *NULL* with an exception set if an error occurred. Before "
"Python 2.4, the module could still be created in error cases. Starting with "
"Python 2.4, *name* is removed from :attr:`sys.modules` in error cases, and "
"even if *name* was already in :attr:`sys.modules` on entry to :c:func:"
"`PyImport_ExecCodeModule`. Leaving incompletely initialized modules in :"
"attr:`sys.modules` is dangerous, as imports of such modules have no way to "
"know that the module object is an unknown (and probably damaged with respect "
"to the module author's intents) state."
msgstr ""
# e26e0270a5a7453d9844019560aa3e7a
#: ../src/Doc/c-api/import.rst:141
msgid ""
"The module's :attr:`__file__` attribute will be set to the code object's :c:"
"member:`co_filename`."
msgstr ""
# 15af7810b6fb439b860b4c106ec676a9
#: ../src/Doc/c-api/import.rst:144
msgid ""
"This function will reload the module if it was already imported. See :c:"
"func:`PyImport_ReloadModule` for the intended way to reload a module."
msgstr ""
# fa69f4b211be4d75a211d730734a6629
#: ../src/Doc/c-api/import.rst:147
msgid ""
"If *name* points to a dotted name of the form ``package.module``, any "
"package structures not already created will still not be created."
msgstr ""
# 70107fbe94ba4fff84f22c7c840154e6
#: ../src/Doc/c-api/import.rst:156
msgid ""
"Like :c:func:`PyImport_ExecCodeModule`, but the :attr:`__file__` attribute "
"of the module object is set to *pathname* if it is non-``NULL``."
msgstr ""
# 20fc519c05fc42cd81225e1b04980d2d
#: ../src/Doc/c-api/import.rst:162
msgid ""
"Return the magic number for Python bytecode files (a.k.a. :file:`.pyc` and :"
"file:`.pyo` files). The magic number should be present in the first four "
"bytes of the bytecode file, in little-endian byte order."
msgstr ""
# 8b86258be4674e699cfc4ae144ea833a
#: ../src/Doc/c-api/import.rst:169
msgid ""
"Return the dictionary used for the module administration (a.k.a. ``sys."
"modules``). Note that this is a per-interpreter variable."
msgstr ""
# ccd0bfc24897453ea7e8d6923f2b3e03
#: ../src/Doc/c-api/import.rst:175
msgid ""
"Return an importer object for a :data:`sys.path`/:attr:`pkg.__path__` item "
"*path*, possibly by fetching it from the :data:`sys.path_importer_cache` "
"dict. If it wasn't yet cached, traverse :data:`sys.path_hooks` until a hook "
"is found that can handle the path item. Return ``None`` if no hook could; "
"this tells our caller it should fall back to the built-in import mechanism. "
"Cache the result in :data:`sys.path_importer_cache`. Return a new reference "
"to the importer object."
msgstr ""
# af49c3f41af84c3db64a73ae9b137bd0
#: ../src/Doc/c-api/import.rst:188
msgid "Initialize the import mechanism. For internal use only."
msgstr ""
# f6da1f9b86b949d8880ab789c6601885
#: ../src/Doc/c-api/import.rst:193
msgid "Empty the module table. For internal use only."
msgstr ""
# af2ccd091b874d5eb97ce3d84250a0f3
#: ../src/Doc/c-api/import.rst:198
msgid "Finalize the import mechanism. For internal use only."
msgstr ""
# 6801efcd7b75443a90e5c106e2e74a01
# 81dfdb3341104241882dfe755cb6a5da
#: ../src/Doc/c-api/import.rst:203 ../src/Doc/c-api/import.rst:208
msgid "For internal use only."
msgstr ""
# 399b191705e144ca90740079a2bdc4f0
#: ../src/Doc/c-api/import.rst:213
msgid ""
"Load a frozen module named *name*. Return ``1`` for success, ``0`` if the "
"module is not found, and ``-1`` with an exception set if the initialization "
"failed. To access the imported module on a successful load, use :c:func:"
"`PyImport_ImportModule`. (Note the misnomer --- this function would reload "
"the module if it was already imported.)"
msgstr ""
# e37ebade9e03455586bbc8ed121d1901
#: ../src/Doc/c-api/import.rst:224
msgid ""
"This is the structure type definition for frozen module descriptors, as "
"generated by the :program:`freeze` utility (see :file:`Tools/freeze/` in the "
"Python source distribution). Its definition, found in :file:`Include/import."
"h`, is::"
msgstr ""
# 8bf8debaea4241c084ba431c157a92e2
#: ../src/Doc/c-api/import.rst:238
msgid ""
"This pointer is initialized to point to an array of :c:type:`struct _frozen` "
"records, terminated by one whose members are all *NULL* or zero. When a "
"frozen module is imported, it is searched in this table. Third-party code "
"could play tricks with this to provide a dynamically created collection of "
"frozen modules."
msgstr ""
# 3ec2106d063d497a87faa91334c9a123
#: ../src/Doc/c-api/import.rst:246
msgid ""
"Add a single module to the existing table of built-in modules. This is a "
"convenience wrapper around :c:func:`PyImport_ExtendInittab`, returning "
"``-1`` if the table could not be extended. The new module can be imported "
"by the name *name*, and uses the function *initfunc* as the initialization "
"function called on the first attempted import. This should be called "
"before :c:func:`Py_Initialize`."
msgstr ""
# 432690bea89f463dae506ecb451812e5
#: ../src/Doc/c-api/import.rst:256
msgid ""
"Structure describing a single entry in the list of built-in modules. Each "
"of these structures gives the name and initialization function for a module "
"built into the interpreter. Programs which embed Python may use an array of "
"these structures in conjunction with :c:func:`PyImport_ExtendInittab` to "
"provide additional built-in modules. The structure is defined in :file:"
"`Include/import.h` as::"
msgstr ""
# 4f310c256b724dffaa990961463e0dd7
#: ../src/Doc/c-api/import.rst:271
msgid ""
"Add a collection of modules to the table of built-in modules. The *newtab* "
"array must end with a sentinel entry which contains *NULL* for the :attr:"
"`name` field; failure to provide the sentinel value can result in a memory "
"fault. Returns ``0`` on success or ``-1`` if insufficient memory could be "
"allocated to extend the internal table. In the event of failure, no modules "
"are added to the internal table. This should be called before :c:func:"
"`Py_Initialize`."
msgstr ""
#: ../src/Doc/c-api/index.rst:5
msgid "Python/C API Reference Manual"
msgstr ""
#: ../src/Doc/c-api/index.rst:7
msgid ""
"This manual documents the API used by C and C++ programmers who want to "
"write extension modules or embed Python. It is a companion to :ref:"
"`extending-index`, which describes the general principles of extension "
"writing but does not document the API functions in detail."
msgstr ""
#: ../src/Doc/c-api/init.rst:8
msgid "Initialization, Finalization, and Threads"
msgstr ""
# 5942f7ee7e834286b4599effa3a59259
#: ../src/Doc/c-api/init.rst:12
msgid "Initializing and finalizing the interpreter"
msgstr ""
# 594c0ed7dea741ff8260ecf5319852cf
#: ../src/Doc/c-api/init.rst:32
msgid ""
"Initialize the Python interpreter. In an application embedding Python, "
"this should be called before using any other Python/C API functions; with "
"the exception of :c:func:`Py_SetProgramName`, :c:func:`Py_SetPythonHome`, :c:"
"func:`PyEval_InitThreads`, :c:func:`PyEval_ReleaseLock`, and :c:func:"
"`PyEval_AcquireLock`. This initializes the table of loaded modules (``sys."
"modules``), and creates the fundamental modules :mod:`__builtin__`, :mod:"
"`__main__` and :mod:`sys`. It also initializes the module search path "
"(``sys.path``). It does not set ``sys.argv``; use :c:func:`PySys_SetArgvEx` "
"for that. This is a no-op when called for a second time (without calling :c:"
"func:`Py_Finalize` first). There is no return value; it is a fatal error if "
"the initialization fails."
msgstr ""
# 4730806aab62447f959c12e85741fc92
#: ../src/Doc/c-api/init.rst:46
msgid ""
"This function works like :c:func:`Py_Initialize` if *initsigs* is 1. If "
"*initsigs* is 0, it skips initialization registration of signal handlers, "
"which might be useful when Python is embedded."
msgstr ""
# e78f307055af4f1aacc83fed7502f7a7
#: ../src/Doc/c-api/init.rst:55
msgid ""
"Return true (nonzero) when the Python interpreter has been initialized, "
"false (zero) if not. After :c:func:`Py_Finalize` is called, this returns "
"false until :c:func:`Py_Initialize` is called again."
msgstr ""
# 8f1bef520636490b8927798a6c094afd
#: ../src/Doc/c-api/init.rst:62
msgid ""
"Undo all initializations made by :c:func:`Py_Initialize` and subsequent use "
"of Python/C API functions, and destroy all sub-interpreters (see :c:func:"
"`Py_NewInterpreter` below) that were created and not yet destroyed since the "
"last call to :c:func:`Py_Initialize`. Ideally, this frees all memory "
"allocated by the Python interpreter. This is a no-op when called for a "
"second time (without calling :c:func:`Py_Initialize` again first). There is "
"no return value; errors during finalization are ignored."
msgstr ""
# 51b00b00391d4223aee45aab88c13fcd
#: ../src/Doc/c-api/init.rst:70
msgid ""
"This function is provided for a number of reasons. An embedding application "
"might want to restart Python without having to restart the application "
"itself. An application that has loaded the Python interpreter from a "
"dynamically loadable library (or DLL) might want to free all memory "
"allocated by Python before unloading the DLL. During a hunt for memory leaks "
"in an application a developer might want to free all memory allocated by "
"Python before exiting from the application."
msgstr ""
# 2460ef472a834555a626fd52af1e15b3
#: ../src/Doc/c-api/init.rst:78
msgid ""
"**Bugs and caveats:** The destruction of modules and objects in modules is "
"done in random order; this may cause destructors (:meth:`__del__` methods) "
"to fail when they depend on other objects (even functions) or modules. "
"Dynamically loaded extension modules loaded by Python are not unloaded. "
"Small amounts of memory allocated by the Python interpreter may not be freed "
"(if you find a leak, please report it). Memory tied up in circular "
"references between objects is not freed. Some memory allocated by extension "
"modules may not be freed. Some extensions may not work properly if their "
"initialization routine is called more than once; this can happen if an "
"application calls :c:func:`Py_Initialize` and :c:func:`Py_Finalize` more "
"than once."
msgstr ""
# 65e9775fd5f64b8fb0c88bcf0da22491
#: ../src/Doc/c-api/init.rst:91
msgid "Process-wide parameters"
msgstr ""
# 88c46775d77f4437aef6dada8cdec12a
#: ../src/Doc/c-api/init.rst:101
msgid ""
"This function should be called before :c:func:`Py_Initialize` is called for "
"the first time, if it is called at all. It tells the interpreter the value "
"of the ``argv[0]`` argument to the :c:func:`main` function of the program. "
"This is used by :c:func:`Py_GetPath` and some other functions below to find "
"the Python run-time libraries relative to the interpreter executable. The "
"default value is ``'python'``. The argument should point to a zero-"
"terminated character string in static storage whose contents will not change "
"for the duration of the program's execution. No code in the Python "
"interpreter will change the contents of this storage."
msgstr ""
# 0e71308a19f146fabe2e49d732642902
#: ../src/Doc/c-api/init.rst:116
msgid ""
"Return the program name set with :c:func:`Py_SetProgramName`, or the "
"default. The returned string points into static storage; the caller should "
"not modify its value."
msgstr ""
# 93441093ea84472899a74adb52ad9a20
#: ../src/Doc/c-api/init.rst:123
msgid ""
"Return the *prefix* for installed platform-independent files. This is "
"derived through a number of complicated rules from the program name set "
"with :c:func:`Py_SetProgramName` and some environment variables; for "
"example, if the program name is ``'/usr/local/bin/python'``, the prefix is "
"``'/usr/local'``. The returned string points into static storage; the caller "
"should not modify its value. This corresponds to the :makevar:`prefix` "
"variable in the top-level :file:`Makefile` and the ``--prefix`` argument to "
"the :program:`configure` script at build time. The value is available to "
"Python code as ``sys.prefix``. It is only useful on Unix. See also the next "
"function."
msgstr ""
# 22bb0517ce0a43808b374cb699ac2da8
#: ../src/Doc/c-api/init.rst:136
msgid ""
"Return the *exec-prefix* for installed platform-*dependent* files. This is "
"derived through a number of complicated rules from the program name set "
"with :c:func:`Py_SetProgramName` and some environment variables; for "
"example, if the program name is ``'/usr/local/bin/python'``, the exec-prefix "
"is ``'/usr/local'``. The returned string points into static storage; the "
"caller should not modify its value. This corresponds to the :makevar:"
"`exec_prefix` variable in the top-level :file:`Makefile` and the ``--exec-"
"prefix`` argument to the :program:`configure` script at build time. The "
"value is available to Python code as ``sys.exec_prefix``. It is only useful "
"on Unix."
msgstr ""
# 924befbd83dd4bb88b70c62814cc3cd2
#: ../src/Doc/c-api/init.rst:146
msgid ""
"Background: The exec-prefix differs from the prefix when platform dependent "
"files (such as executables and shared libraries) are installed in a "
"different directory tree. In a typical installation, platform dependent "
"files may be installed in the :file:`/usr/local/plat` subtree while platform "
"independent may be installed in :file:`/usr/local`."
msgstr ""
# f2d7e1327de14b4097712a7ca7b21a8e
#: ../src/Doc/c-api/init.rst:152
msgid ""
"Generally speaking, a platform is a combination of hardware and software "
"families, e.g. Sparc machines running the Solaris 2.x operating system are "
"considered the same platform, but Intel machines running Solaris 2.x are "
"another platform, and Intel machines running Linux are yet another "
"platform. Different major revisions of the same operating system generally "
"also form different platforms. Non-Unix operating systems are a different "
"story; the installation strategies on those systems are so different that "
"the prefix and exec-prefix are meaningless, and set to the empty string. "
"Note that compiled Python bytecode files are platform independent (but not "
"independent from the Python version by which they were compiled!)."
msgstr ""
# bc79838ee35048b183940900d3eb5ca2
#: ../src/Doc/c-api/init.rst:163
msgid ""
"System administrators will know how to configure the :program:`mount` or :"
"program:`automount` programs to share :file:`/usr/local` between platforms "
"while having :file:`/usr/local/plat` be a different filesystem for each "
"platform."
msgstr ""
# bedc2e3771624d57a7c139d42eeea342
#: ../src/Doc/c-api/init.rst:175
msgid ""
"Return the full program name of the Python executable; this is computed as "
"a side-effect of deriving the default module search path from the program "
"name (set by :c:func:`Py_SetProgramName` above). The returned string points "
"into static storage; the caller should not modify its value. The value is "
"available to Python code as ``sys.executable``."
msgstr ""
# 0a8b7488687b4ea9ba428c4158a76321
#: ../src/Doc/c-api/init.rst:188
msgid ""
"Return the default module search path; this is computed from the program "
"name (set by :c:func:`Py_SetProgramName` above) and some environment "
"variables. The returned string consists of a series of directory names "
"separated by a platform dependent delimiter character. The delimiter "
"character is ``':'`` on Unix and Mac OS X, ``';'`` on Windows. The returned "
"string points into static storage; the caller should not modify its value. "
"The list :data:`sys.path` is initialized with this value on interpreter "
"startup; it can be (and usually is) modified later to change the search path "
"for loading modules."
msgstr ""
# 7b6b7986049a4a549d818dbd154c05ea
#: ../src/Doc/c-api/init.rst:203
msgid ""
"Return the version of this Python interpreter. This is a string that looks "
"something like ::"
msgstr ""
# fbe841314c97438f86fcb507a4966462
#: ../src/Doc/c-api/init.rst:210
msgid ""
"The first word (up to the first space character) is the current Python "
"version; the first three characters are the major and minor version "
"separated by a period. The returned string points into static storage; the "
"caller should not modify its value. The value is available to Python code "
"as ``sys.version``."
msgstr ""
# 929481f5ca8741e3aa25f9ae90b87566
#: ../src/Doc/c-api/init.rst:220
msgid ""
"Return the platform identifier for the current platform. On Unix, this is "
"formed from the \"official\" name of the operating system, converted to "
"lower case, followed by the major revision number; e.g., for Solaris 2.x, "
"which is also known as SunOS 5.x, the value is ``'sunos5'``. On Mac OS X, "
"it is ``'darwin'``. On Windows, it is ``'win'``. The returned string "
"points into static storage; the caller should not modify its value. The "
"value is available to Python code as ``sys.platform``."
msgstr ""
# 302571bbe39c4f49a4153bd346665b2d
#: ../src/Doc/c-api/init.rst:231
msgid ""
"Return the official copyright string for the current Python version, for "
"example"
msgstr ""
# 2d665ab4ae7a43ff8bb478b920881099
#: ../src/Doc/c-api/init.rst:233
msgid "``'Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam'``"
msgstr ""
# 0e5573ae80f1493ea7da14d21f8efce4
#: ../src/Doc/c-api/init.rst:237
msgid ""
"The returned string points into static storage; the caller should not modify "
"its value. The value is available to Python code as ``sys.copyright``."
msgstr ""
# e63a7f39713f4cf696604b854e56a04a
#: ../src/Doc/c-api/init.rst:243
msgid ""
"Return an indication of the compiler used to build the current Python "
"version, in square brackets, for example::"
msgstr ""
# b3c2091a97d84fbb952618e12e6fa2d5
# df3f2f57544f447d8bf9e7f1ba3ddcd0
#: ../src/Doc/c-api/init.rst:250 ../src/Doc/c-api/init.rst:264
msgid ""
"The returned string points into static storage; the caller should not modify "
"its value. The value is available to Python code as part of the variable "
"``sys.version``."
msgstr ""
# 0ac70094af0b44cd940dc76363ade22b
#: ../src/Doc/c-api/init.rst:257
msgid ""
"Return information about the sequence number and build date and time of the "
"current Python interpreter instance, for example ::"
msgstr ""
# 670dff176c4e42ebaf3b51e640f30dab
#: ../src/Doc/c-api/init.rst:276
msgid ""
"Set :data:`sys.argv` based on *argc* and *argv*. These parameters are "
"similar to those passed to the program's :c:func:`main` function with the "
"difference that the first entry should refer to the script file to be "
"executed rather than the executable hosting the Python interpreter. If "
"there isn't a script that will be run, the first entry in *argv* can be an "
"empty string. If this function fails to initialize :data:`sys.argv`, a "
"fatal condition is signalled using :c:func:`Py_FatalError`."
msgstr ""
# d04fc3b3d948451d8f5e72d2052ffe97
#: ../src/Doc/c-api/init.rst:284
msgid ""
"If *updatepath* is zero, this is all the function does. If *updatepath* is "
"non-zero, the function also modifies :data:`sys.path` according to the "
"following algorithm:"
msgstr ""
# 0247763a26314444b6d3fb3a82474ed3
#: ../src/Doc/c-api/init.rst:288
msgid ""
"If the name of an existing script is passed in ``argv[0]``, the absolute "
"path of the directory where the script is located is prepended to :data:`sys."
"path`."
msgstr ""
# 9e773bc5bd184da591ad451777f0d59d
#: ../src/Doc/c-api/init.rst:291
msgid ""
"Otherwise (that is, if *argc* is 0 or ``argv[0]`` doesn't point to an "
"existing file name), an empty string is prepended to :data:`sys.path`, which "
"is the same as prepending the current working directory (``\".\"``)."
msgstr ""
# 7b13fdd5bec94e0888c9cfedd743a262
#: ../src/Doc/c-api/init.rst:297
msgid ""
"It is recommended that applications embedding the Python interpreter for "
"purposes other than executing a single script pass 0 as *updatepath*, and "
"update :data:`sys.path` themselves if desired. See `CVE-2008-5983 <http://"
"cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_."
msgstr ""
# fce5c3f7e370497a9e8f09de0b8ded57
#: ../src/Doc/c-api/init.rst:302
msgid ""
"On versions before 2.6.6, you can achieve the same effect by manually "
"popping the first :data:`sys.path` element after having called :c:func:"
"`PySys_SetArgv`, for example using::"
msgstr ""
# d841765183d443d1bba65e3cb97ec1d5
#: ../src/Doc/c-api/init.rst:316
msgid ""
"This function works like :c:func:`PySys_SetArgvEx` with *updatepath* set to "
"1."
msgstr ""
# 68a9a27bbc37482d8c016d277bc8f9fe
#: ../src/Doc/c-api/init.rst:321
msgid ""
"Set the default \"home\" directory, that is, the location of the standard "
"Python libraries. See :envvar:`PYTHONHOME` for the meaning of the argument "
"string."
msgstr ""
# 60e0e24c404d460cbec49777677700fc
#: ../src/Doc/c-api/init.rst:325
msgid ""
"The argument should point to a zero-terminated character string in static "
"storage whose contents will not change for the duration of the program's "
"execution. No code in the Python interpreter will change the contents of "
"this storage."
msgstr ""
# 01a74568760d43eda26fe780178d6df8
#: ../src/Doc/c-api/init.rst:333
msgid ""
"Return the default \"home\", that is, the value set by a previous call to :c:"
"func:`Py_SetPythonHome`, or the value of the :envvar:`PYTHONHOME` "
"environment variable if it is set."
msgstr ""
#: ../src/Doc/c-api/init.rst:341
msgid "Thread State and the Global Interpreter Lock"
msgstr ""
# c32db2cc974746e5ad9c44e7917ee7f9
#: ../src/Doc/c-api/init.rst:349
msgid ""
"The Python interpreter is not fully thread-safe. In order to support multi-"
"threaded Python programs, there's a global lock, called the :term:`global "
"interpreter lock` or :term:`GIL`, that must be held by the current thread "
"before it can safely access Python objects. Without the lock, even the "
"simplest operations could cause problems in a multi-threaded program: for "
"example, when two threads simultaneously increment the reference count of "
"the same object, the reference count could end up being incremented only "
"once instead of twice."
msgstr ""
# 2aa1f41e035b4cac8350a6022aa33b69
#: ../src/Doc/c-api/init.rst:359
msgid ""
"Therefore, the rule exists that only the thread that has acquired the :term:"
"`GIL` may operate on Python objects or call Python/C API functions. In order "
"to emulate concurrency of execution, the interpreter regularly tries to "
"switch threads (see :func:`sys.setcheckinterval`). The lock is also "
"released around potentially blocking I/O operations like reading or writing "
"a file, so that other Python threads can run in the meantime."
msgstr ""
# 67586f788b284e96a5a231672661477b
#: ../src/Doc/c-api/init.rst:370
msgid ""
"The Python interpreter keeps some thread-specific bookkeeping information "
"inside a data structure called :c:type:`PyThreadState`. There's also one "
"global variable pointing to the current :c:type:`PyThreadState`: it can be "
"retrieved using :c:func:`PyThreadState_Get`."
msgstr ""
# dcf3657280da41e4b133eab9086264be
#: ../src/Doc/c-api/init.rst:376
msgid "Releasing the GIL from extension code"
msgstr ""
# b7860765ba8a41bc9585f5bb16d18c22
#: ../src/Doc/c-api/init.rst:378
msgid ""
"Most extension code manipulating the :term:`GIL` has the following simple "
"structure::"
msgstr ""
#: ../src/Doc/c-api/init.rst:387
msgid "This is so common that a pair of macros exists to simplify it::"
msgstr ""
# 68505f7811d649c69ebabbcdb6c3b170
#: ../src/Doc/c-api/init.rst:397
msgid ""
"The :c:macro:`Py_BEGIN_ALLOW_THREADS` macro opens a new block and declares a "
"hidden local variable; the :c:macro:`Py_END_ALLOW_THREADS` macro closes the "
"block. These two macros are still available when Python is compiled without "
"thread support (they simply have an empty expansion)."
msgstr ""
#: ../src/Doc/c-api/init.rst:402
msgid ""
"When thread support is enabled, the block above expands to the following "
"code::"
msgstr ""
# 07ea1dd0892d4389ab654f831da05685
#: ../src/Doc/c-api/init.rst:414
msgid ""
"Here is how these functions work: the global interpreter lock is used to "
"protect the pointer to the current thread state. When releasing the lock "
"and saving the thread state, the current thread state pointer must be "
"retrieved before the lock is released (since another thread could "
"immediately acquire the lock and store its own thread state in the global "
"variable). Conversely, when acquiring the lock and restoring the thread "
"state, the lock must be acquired before storing the thread state pointer."
msgstr ""
# a435578e55c74addae413aa5bc0833be
#: ../src/Doc/c-api/init.rst:423
msgid ""
"Calling system I/O functions is the most common use case for releasing the "
"GIL, but it can also be useful before calling long-running computations "
"which don't need access to Python objects, such as compression or "
"cryptographic functions operating over memory buffers. For example, the "
"standard :mod:`zlib` and :mod:`hashlib` modules release the GIL when "
"compressing or hashing data."
msgstr ""
# ee26a6a26e974a69be87de058b1a266a
#: ../src/Doc/c-api/init.rst:434
msgid "Non-Python created threads"
msgstr ""
# 8d5e2398328d426689f275881dab3d37
#: ../src/Doc/c-api/init.rst:436
msgid ""
"When threads are created using the dedicated Python APIs (such as the :mod:"
"`threading` module), a thread state is automatically associated to them and "
"the code showed above is therefore correct. However, when threads are "
"created from C (for example by a third-party library with its own thread "
"management), they don't hold the GIL, nor is there a thread state structure "
"for them."
msgstr ""
# b61bc2ecdc7b4a14a4675a291bcdee35
#: ../src/Doc/c-api/init.rst:443
msgid ""
"If you need to call Python code from these threads (often this will be part "
"of a callback API provided by the aforementioned third-party library), you "
"must first register these threads with the interpreter by creating a thread "
"state data structure, then acquiring the GIL, and finally storing their "
"thread state pointer, before you can start using the Python/C API. When you "
"are done, you should reset the thread state pointer, release the GIL, and "
"finally free the thread state data structure."
msgstr ""
# 5d4ed33f17924ebba38932bd4549184c
#: ../src/Doc/c-api/init.rst:451
msgid ""
"The :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release` functions "
"do all of the above automatically. The typical idiom for calling into "
"Python from a C thread is::"
msgstr ""
# c1093285747945ceb5b449f34d54212a
#: ../src/Doc/c-api/init.rst:465
msgid ""
"Note that the :c:func:`PyGILState_\\*` functions assume there is only one "
"global interpreter (created automatically by :c:func:`Py_Initialize`). "
"Python supports the creation of additional interpreters (using :c:func:"
"`Py_NewInterpreter`), but mixing multiple interpreters and the :c:func:"
"`PyGILState_\\*` API is unsupported."
msgstr ""
# 4e4d2ee051ea42a49b62a1174a857341
#: ../src/Doc/c-api/init.rst:471
msgid ""
"Another important thing to note about threads is their behaviour in the face "
"of the C :c:func:`fork` call. On most systems with :c:func:`fork`, after a "
"process forks only the thread that issued the fork will exist. That also "
"means any locks held by other threads will never be released. Python solves "
"this for :func:`os.fork` by acquiring the locks it uses internally before "
"the fork, and releasing them afterwards. In addition, it resets any :ref:"
"`lock-objects` in the child. When extending or embedding Python, there is no "
"way to inform Python of additional (non-Python) locks that need to be "
"acquired before or reset after a fork. OS facilities such as :c:func:"
"`pthread_atfork` would need to be used to accomplish the same thing. "
"Additionally, when extending or embedding Python, calling :c:func:`fork` "
"directly rather than through :func:`os.fork` (and returning to or calling "
"into Python) may result in a deadlock by one of Python's internal locks "
"being held by a thread that is defunct after the fork. :c:func:"
"`PyOS_AfterFork` tries to reset the necessary locks, but is not always able "
"to."
msgstr ""
# c9450dadf68140f5bc684504ca7c784a
#: ../src/Doc/c-api/init.rst:490
msgid "High-level API"
msgstr ""
# af37de28f29240908137a7172deabc24
#: ../src/Doc/c-api/init.rst:492
msgid ""
"These are the most commonly used types and functions when writing C "
"extension code, or when embedding the Python interpreter:"
msgstr ""
# 880f0d9aa8d74e44a2bd32c84f67d31d
#: ../src/Doc/c-api/init.rst:497
msgid ""
"This data structure represents the state shared by a number of cooperating "
"threads. Threads belonging to the same interpreter share their module "
"administration and a few other internal items. There are no public members "
"in this structure."
msgstr ""
# 1bdf78df959545e8974de65f98d67a0c
#: ../src/Doc/c-api/init.rst:502
msgid ""
"Threads belonging to different interpreters initially share nothing, except "
"process state like available memory, open file descriptors and such. The "
"global interpreter lock is also shared by all threads, regardless of to "
"which interpreter they belong."
msgstr ""
# 269d54471e1a42298127efa423c02d6a
#: ../src/Doc/c-api/init.rst:510
msgid ""
"This data structure represents the state of a single thread. The only "
"public data member is :c:type:`PyInterpreterState \\*`:attr:`interp`, which "
"points to this thread's interpreter state."
msgstr ""
# 0f4d7266bc0241bd951111bef371a2bc
#: ../src/Doc/c-api/init.rst:523
msgid ""
"Initialize and acquire the global interpreter lock. It should be called in "
"the main thread before creating a second thread or engaging in any other "
"thread operations such as :c:func:`PyEval_ReleaseLock` or "
"``PyEval_ReleaseThread(tstate)``. It is not needed before calling :c:func:"
"`PyEval_SaveThread` or :c:func:`PyEval_RestoreThread`."
msgstr ""
# 8ec87c4e0e40446b98d0ad20c0ed7c40
#: ../src/Doc/c-api/init.rst:531
msgid ""
"This is a no-op when called for a second time. It is safe to call this "
"function before calling :c:func:`Py_Initialize`."
msgstr ""
# 5c69e5f971b746bc8e8857e9052538bc
#: ../src/Doc/c-api/init.rst:538
msgid ""
"When only the main thread exists, no GIL operations are needed. This is a "
"common situation (most Python programs do not use threads), and the lock "
"operations slow the interpreter down a bit. Therefore, the lock is not "
"created initially. This situation is equivalent to having acquired the "
"lock: when there is only a single thread, all object accesses are safe. "
"Therefore, when this function initializes the global interpreter lock, it "
"also acquires it. Before the Python :mod:`_thread` module creates a new "
"thread, knowing that either it has the lock or the lock hasn't been created "
"yet, it calls :c:func:`PyEval_InitThreads`. When this call returns, it is "
"guaranteed that the lock has been created and that the calling thread has "
"acquired it."
msgstr ""
# 565386aad6c04991958f29121bf048bf
#: ../src/Doc/c-api/init.rst:549
msgid ""
"It is **not** safe to call this function when it is unknown which thread (if "
"any) currently has the global interpreter lock."
msgstr ""
# 74aa20dc287a45609a4914c783a14a5c
#: ../src/Doc/c-api/init.rst:552
msgid ""
"This function is not available when thread support is disabled at compile "
"time."
msgstr ""
# 96cdca194d1141cfbc0af07bb0778bbd
#: ../src/Doc/c-api/init.rst:557
msgid ""
"Returns a non-zero value if :c:func:`PyEval_InitThreads` has been called. "
"This function can be called without holding the GIL, and therefore can be "
"used to avoid calls to the locking API when running single-threaded. This "
"function is not available when thread support is disabled at compile time."
msgstr ""
# 2615b1ddc0da41a7a6150cd28975bd17
#: ../src/Doc/c-api/init.rst:567
msgid ""
"Release the global interpreter lock (if it has been created and thread "
"support is enabled) and reset the thread state to *NULL*, returning the "
"previous thread state (which is not *NULL*). If the lock has been created, "
"the current thread must have acquired it. (This function is available even "
"when thread support is disabled at compile time.)"
msgstr ""
# 2234ee77938d408b9d228caa8de38393
#: ../src/Doc/c-api/init.rst:576
msgid ""
"Acquire the global interpreter lock (if it has been created and thread "
"support is enabled) and set the thread state to *tstate*, which must not be "
"*NULL*. If the lock has been created, the current thread must not have "
"acquired it, otherwise deadlock ensues. (This function is available even "
"when thread support is disabled at compile time.)"
msgstr ""
# 7a70faeeddd6442589a2e091908f337e
#: ../src/Doc/c-api/init.rst:585
msgid ""
"Return the current thread state. The global interpreter lock must be held. "
"When the current thread state is *NULL*, this issues a fatal error (so that "
"the caller needn't check for *NULL*)."
msgstr ""
# ba7153e8c0194130973d955de1e70fee
#: ../src/Doc/c-api/init.rst:592
msgid ""
"Swap the current thread state with the thread state given by the argument "
"*tstate*, which may be *NULL*. The global interpreter lock must be held and "
"is not released."
msgstr ""
# d3f1bb211e0842febc28f8d383e5cd9f
#: ../src/Doc/c-api/init.rst:599
msgid ""
"This function is called from :c:func:`PyOS_AfterFork` to ensure that newly "
"created child processes don't hold locks referring to threads which are not "
"running in the child process."
msgstr ""
# bd92ab18ec0e4b42918fa62cf5ab0aa9
#: ../src/Doc/c-api/init.rst:604
msgid ""
"The following functions use thread-local storage, and are not compatible "
"with sub-interpreters:"
msgstr ""
# b38f8f04bb0f40498442be183ef9228a
#: ../src/Doc/c-api/init.rst:609
msgid ""
"Ensure that the current thread is ready to call the Python C API regardless "
"of the current state of Python, or of the global interpreter lock. This may "
"be called as many times as desired by a thread as long as each call is "
"matched with a call to :c:func:`PyGILState_Release`. In general, other "
"thread-related APIs may be used between :c:func:`PyGILState_Ensure` and :c:"
"func:`PyGILState_Release` calls as long as the thread state is restored to "
"its previous state before the Release(). For example, normal usage of the :"
"c:macro:`Py_BEGIN_ALLOW_THREADS` and :c:macro:`Py_END_ALLOW_THREADS` macros "
"is acceptable."
msgstr ""
# a12b24cd1078482db8a67b205ccb26c0
#: ../src/Doc/c-api/init.rst:619
msgid ""
"The return value is an opaque \"handle\" to the thread state when :c:func:"
"`PyGILState_Ensure` was called, and must be passed to :c:func:"
"`PyGILState_Release` to ensure Python is left in the same state. Even though "
"recursive calls are allowed, these handles *cannot* be shared - each unique "
"call to :c:func:`PyGILState_Ensure` must save the handle for its call to :c:"
"func:`PyGILState_Release`."
msgstr ""
# 80a91b9d2f8441038b9899c8e03ef02d
#: ../src/Doc/c-api/init.rst:626
msgid ""
"When the function returns, the current thread will hold the GIL and be able "
"to call arbitrary Python code. Failure is a fatal error."
msgstr ""
# ccf404df89094e76a90776bc24c3ede3
#: ../src/Doc/c-api/init.rst:634
msgid ""
"Release any resources previously acquired. After this call, Python's state "
"will be the same as it was prior to the corresponding :c:func:"
"`PyGILState_Ensure` call (but generally this state will be unknown to the "
"caller, hence the use of the GILState API)."
msgstr ""
# bd5e9e17f59647d790066d86ed6f8a1b
#: ../src/Doc/c-api/init.rst:639
msgid ""
"Every call to :c:func:`PyGILState_Ensure` must be matched by a call to :c:"
"func:`PyGILState_Release` on the same thread."
msgstr ""
# 45e233db53b64c02a7a1af3ab4b51882
#: ../src/Doc/c-api/init.rst:647
msgid ""
"Get the current thread state for this thread. May return ``NULL`` if no "
"GILState API has been used on the current thread. Note that the main thread "
"always has such a thread-state, even if no auto-thread-state call has been "
"made on the main thread. This is mainly a helper/diagnostic function."
msgstr ""
#: ../src/Doc/c-api/init.rst:655
msgid ""
"The following macros are normally used without a trailing semicolon; look "
"for example usage in the Python source distribution."
msgstr ""
# 613ec706b32249a5a94792ef6237d5ff
#: ../src/Doc/c-api/init.rst:661
msgid ""
"This macro expands to ``{ PyThreadState *_save; _save = PyEval_SaveThread();"
"``. Note that it contains an opening brace; it must be matched with a "
"following :c:macro:`Py_END_ALLOW_THREADS` macro. See above for further "
"discussion of this macro. It is a no-op when thread support is disabled at "
"compile time."
msgstr ""
# d6ec9e23154e4d21aef238b9560d61fc
#: ../src/Doc/c-api/init.rst:669
msgid ""
"This macro expands to ``PyEval_RestoreThread(_save); }``. Note that it "
"contains a closing brace; it must be matched with an earlier :c:macro:"
"`Py_BEGIN_ALLOW_THREADS` macro. See above for further discussion of this "
"macro. It is a no-op when thread support is disabled at compile time."
msgstr ""
# 778eb74063ca4b69966f71afcca695d7
#: ../src/Doc/c-api/init.rst:677
msgid ""
"This macro expands to ``PyEval_RestoreThread(_save);``: it is equivalent to :"
"c:macro:`Py_END_ALLOW_THREADS` without the closing brace. It is a no-op "
"when thread support is disabled at compile time."
msgstr ""
# 9b518b5fc79540f0b94110d4a76d726c
#: ../src/Doc/c-api/init.rst:684
msgid ""
"This macro expands to ``_save = PyEval_SaveThread();``: it is equivalent to :"
"c:macro:`Py_BEGIN_ALLOW_THREADS` without the opening brace and variable "
"declaration. It is a no-op when thread support is disabled at compile time."
msgstr ""
# bd29bedf2a1f4d48840d0481efd6e17b
#: ../src/Doc/c-api/init.rst:690
msgid "Low-level API"
msgstr ""
#: ../src/Doc/c-api/init.rst:692
msgid ""
"All of the following functions are only available when thread support is "
"enabled at compile time, and must be called only when the global interpreter "
"lock has been created."
msgstr ""
# 5f80405f79f64fb8a6da382cc4f6db77
#: ../src/Doc/c-api/init.rst:699
msgid ""
"Create a new interpreter state object. The global interpreter lock need not "
"be held, but may be held if it is necessary to serialize calls to this "
"function."
msgstr ""
# a5acd393241f481e821dda997683a414
#: ../src/Doc/c-api/init.rst:706
msgid ""
"Reset all information in an interpreter state object. The global "
"interpreter lock must be held."
msgstr ""
# bf97ead2734b4367afb842aa96a6c0eb
#: ../src/Doc/c-api/init.rst:712
msgid ""
"Destroy an interpreter state object. The global interpreter lock need not "
"be held. The interpreter state must have been reset with a previous call "
"to :c:func:`PyInterpreterState_Clear`."
msgstr ""
# 6911b6f7590246b292794413cdd065d1
#: ../src/Doc/c-api/init.rst:719
msgid ""
"Create a new thread state object belonging to the given interpreter object. "
"The global interpreter lock need not be held, but may be held if it is "
"necessary to serialize calls to this function."
msgstr ""
# bd4b9d016a8847d3938702936f127ddc
#: ../src/Doc/c-api/init.rst:726
msgid ""
"Reset all information in a thread state object. The global interpreter lock "
"must be held."
msgstr ""
# 9f2387703ff040fe9d3873f699d0d44d
#: ../src/Doc/c-api/init.rst:732
msgid ""
"Destroy a thread state object. The global interpreter lock need not be "
"held. The thread state must have been reset with a previous call to :c:func:"
"`PyThreadState_Clear`."
msgstr ""
# 36551c63c6dd495c9c453f625094debf
#: ../src/Doc/c-api/init.rst:739
msgid ""
"Return a dictionary in which extensions can store thread-specific state "
"information. Each extension should use a unique key to use to store state "
"in the dictionary. It is okay to call this function when no current thread "
"state is available. If this function returns *NULL*, no exception has been "
"raised and the caller should assume no current thread state is available."
msgstr ""
# da26dee8d12a4fb8997a895bd2cfc9e2
#: ../src/Doc/c-api/init.rst:752
msgid ""
"Asynchronously raise an exception in a thread. The *id* argument is the "
"thread id of the target thread; *exc* is the exception object to be raised. "
"This function does not steal any references to *exc*. To prevent naive "
"misuse, you must write your own C extension to call this. Must be called "
"with the GIL held. Returns the number of thread states modified; this is "
"normally one, but will be zero if the thread id isn't found. If *exc* is :"
"const:`NULL`, the pending exception (if any) for the thread is cleared. This "
"raises no exceptions."
msgstr ""
# 1b58682bfad947df88a146a641a8a4a5
#: ../src/Doc/c-api/init.rst:765
msgid ""
"Acquire the global interpreter lock and set the current thread state to "
"*tstate*, which should not be *NULL*. The lock must have been created "
"earlier. If this thread already has the lock, deadlock ensues."
msgstr ""
# 1eccdf59a0744e32b6245f32d4877d04
#: ../src/Doc/c-api/init.rst:769
msgid ""
":c:func:`PyEval_RestoreThread` is a higher-level function which is always "
"available (even when thread support isn't enabled or when threads have not "
"been initialized)."
msgstr ""
# e6db417743a54f5a98c441bbe9a4d007
#: ../src/Doc/c-api/init.rst:776
msgid ""
"Reset the current thread state to *NULL* and release the global interpreter "
"lock. The lock must have been created earlier and must be held by the "
"current thread. The *tstate* argument, which must not be *NULL*, is only "
"used to check that it represents the current thread state --- if it isn't, a "
"fatal error is reported."
msgstr ""
# 9a41ccb75d1c4f3db1e9461bc3e247fd
#: ../src/Doc/c-api/init.rst:782
msgid ""
":c:func:`PyEval_SaveThread` is a higher-level function which is always "
"available (even when thread support isn't enabled or when threads have not "
"been initialized)."
msgstr ""
# 3fb3853191b8414596f93bc32bae538a
#: ../src/Doc/c-api/init.rst:789
msgid ""
"Acquire the global interpreter lock. The lock must have been created "
"earlier. If this thread already has the lock, a deadlock ensues."
msgstr ""
# cd8fa3b57ac24778859f0012e9d87406
#: ../src/Doc/c-api/init.rst:793
msgid ""
"This function does not change the current thread state. Please use :c:func:"
"`PyEval_RestoreThread` or :c:func:`PyEval_AcquireThread` instead."
msgstr ""
# d354e5d452974de786c49b92d7e9192d
#: ../src/Doc/c-api/init.rst:800
msgid ""
"Release the global interpreter lock. The lock must have been created "
"earlier."
msgstr ""
# d783765b787341a7970d53055fde32fe
#: ../src/Doc/c-api/init.rst:803
msgid ""
"This function does not change the current thread state. Please use :c:func:"
"`PyEval_SaveThread` or :c:func:`PyEval_ReleaseThread` instead."
msgstr ""
# 9ad84b62891645f0a3b10eaa3147d52f
#: ../src/Doc/c-api/init.rst:809
msgid "Sub-interpreter support"
msgstr ""
# c90b501452794f62bbdb5ba7808b8c44
#: ../src/Doc/c-api/init.rst:811
msgid ""
"While in most uses, you will only embed a single Python interpreter, there "
"are cases where you need to create several independent interpreters in the "
"same process and perhaps even in the same thread. Sub-interpreters allow "
"you to do that. You can switch between sub-interpreters using the :c:func:"
"`PyThreadState_Swap` function. You can create and destroy them using the "
"following functions:"
msgstr ""
# 4323589b1c424947a44a4090761bc330
#: ../src/Doc/c-api/init.rst:829
msgid ""
"Create a new sub-interpreter. This is an (almost) totally separate "
"environment for the execution of Python code. In particular, the new "
"interpreter has separate, independent versions of all imported modules, "
"including the fundamental modules :mod:`builtins`, :mod:`__main__` and :mod:"
"`sys`. The table of loaded modules (``sys.modules``) and the module search "
"path (``sys.path``) are also separate. The new environment has no ``sys."
"argv`` variable. It has new standard I/O stream file objects ``sys.stdin``, "
"``sys.stdout`` and ``sys.stderr`` (however these refer to the same "
"underlying file descriptors)."
msgstr ""
# bd599dd83fbf465c8007d36686c38fdd
#: ../src/Doc/c-api/init.rst:839
msgid ""
"The return value points to the first thread state created in the new sub-"
"interpreter. This thread state is made in the current thread state. Note "
"that no actual thread is created; see the discussion of thread states "
"below. If creation of the new interpreter is unsuccessful, *NULL* is "
"returned; no exception is set since the exception state is stored in the "
"current thread state and there may not be a current thread state. (Like all "
"other Python/C API functions, the global interpreter lock must be held "
"before calling this function and is still held when it returns; however, "
"unlike most other Python/C API functions, there needn't be a current thread "
"state on entry.)"
msgstr ""
# cff92381c1ba4a1db3cb67cbe9930b8b
#: ../src/Doc/c-api/init.rst:854
msgid ""
"Extension modules are shared between (sub-)interpreters as follows: the "
"first time a particular extension is imported, it is initialized normally, "
"and a (shallow) copy of its module's dictionary is squirreled away. When "
"the same extension is imported by another (sub-)interpreter, a new module is "
"initialized and filled with the contents of this copy; the extension's "
"``init`` function is not called. Note that this is different from what "
"happens when an extension is imported after the interpreter has been "
"completely re-initialized by calling :c:func:`Py_Finalize` and :c:func:"
"`Py_Initialize`; in that case, the extension's ``initmodule`` function *is* "
"called again."
msgstr ""
# befc21fcc9ef4a7bba9b107032d8607a
#: ../src/Doc/c-api/init.rst:871
msgid ""
"Destroy the (sub-)interpreter represented by the given thread state. The "
"given thread state must be the current thread state. See the discussion of "
"thread states below. When the call returns, the current thread state is "
"*NULL*. All thread states associated with this interpreter are destroyed. "
"(The global interpreter lock must be held before calling this function and "
"is still held when it returns.) :c:func:`Py_Finalize` will destroy all sub-"
"interpreters that haven't been explicitly destroyed at that point."
msgstr ""
# d6aa09ba41084f63b83a1140428e2242
#: ../src/Doc/c-api/init.rst:881
msgid "Bugs and caveats"
msgstr ""
# d11c110b68c14b15ab4a40e2689c8de2
#: ../src/Doc/c-api/init.rst:883
msgid ""
"Because sub-interpreters (and the main interpreter) are part of the same "
"process, the insulation between them isn't perfect --- for example, using "
"low-level file operations like :func:`os.close` they can (accidentally or "
"maliciously) affect each other's open files. Because of the way extensions "
"are shared between (sub-)interpreters, some extensions may not work "
"properly; this is especially likely when the extension makes use of (static) "
"global variables, or when the extension manipulates its module's dictionary "
"after its initialization. It is possible to insert objects created in one "
"sub-interpreter into a namespace of another sub-interpreter; this should be "
"done with great care to avoid sharing user-defined functions, methods, "
"instances or classes between sub-interpreters, since import operations "
"executed by such objects may affect the wrong (sub-)interpreter's dictionary "
"of loaded modules."
msgstr ""
# 5c495b0714bb4a8ca4066259295196db
#: ../src/Doc/c-api/init.rst:897
msgid ""
"Also note that combining this functionality with :c:func:`PyGILState_\\*` "
"APIs is delicate, because these APIs assume a bijection between Python "
"thread states and OS-level threads, an assumption broken by the presence of "
"sub-interpreters. It is highly recommended that you don't switch sub-"
"interpreters between a pair of matching :c:func:`PyGILState_Ensure` and :c:"
"func:`PyGILState_Release` calls. Furthermore, extensions (such as :mod:"
"`ctypes`) using these APIs to allow calling of Python code from non-Python "
"created threads will probably be broken when using sub-interpreters."
msgstr ""
#: ../src/Doc/c-api/init.rst:908
msgid "Asynchronous Notifications"
msgstr ""
# c20a43077d294270947efa860575162f
#: ../src/Doc/c-api/init.rst:910
msgid ""
"A mechanism is provided to make asynchronous notifications to the main "
"interpreter thread. These notifications take the form of a function pointer "
"and a void pointer argument."
msgstr ""
# 97130ad46ca04f79ae439759fc9d0aa7
#: ../src/Doc/c-api/init.rst:919
msgid ""
"Schedule a function to be called from the main interpreter thread. On "
"success, 0 is returned and *func* is queued for being called in the main "
"thread. On failure, -1 is returned without setting any exception."
msgstr ""
# ce4463be62104f31b81a51f4d6329d3b
#: ../src/Doc/c-api/init.rst:923
msgid ""
"When successfully queued, *func* will be *eventually* called from the main "
"interpreter thread with the argument *arg*. It will be called "
"asynchronously with respect to normally running Python code, but with both "
"these conditions met:"
msgstr ""
# 8d62b9e05bbe4fd0b6eed1fe429a6129
#: ../src/Doc/c-api/init.rst:928
msgid "on a :term:`bytecode` boundary;"
msgstr ""
# cb7c03f1fb2241539ec8758b977b7a11
#: ../src/Doc/c-api/init.rst:929
msgid ""
"with the main thread holding the :term:`global interpreter lock` (*func* can "
"therefore use the full C API)."
msgstr ""
# 32f8feb15ec54dd393838f3e1d08705a
#: ../src/Doc/c-api/init.rst:932
msgid ""
"*func* must return 0 on success, or -1 on failure with an exception set. "
"*func* won't be interrupted to perform another asynchronous notification "
"recursively, but it can still be interrupted to switch threads if the global "
"interpreter lock is released."
msgstr ""
# 65eda37a1fd742d49819eb832fb28bc7
#: ../src/Doc/c-api/init.rst:937
msgid ""
"This function doesn't need a current thread state to run, and it doesn't "
"need the global interpreter lock."
msgstr ""
# db61d49e643b4911ace677e9d13759bc
#: ../src/Doc/c-api/init.rst:941
msgid ""
"This is a low-level function, only useful for very special cases. There is "
"no guarantee that *func* will be called as quick as possible. If the main "
"thread is busy executing a system call, *func* won't be called before the "
"system call returns. This function is generally **not** suitable for "
"calling Python code from arbitrary C threads. Instead, use the :ref:"
"`PyGILState API<gilstate>`."
msgstr ""
#: ../src/Doc/c-api/init.rst:954
msgid "Profiling and Tracing"
msgstr ""
#: ../src/Doc/c-api/init.rst:959
msgid ""
"The Python interpreter provides some low-level support for attaching "
"profiling and execution tracing facilities. These are used for profiling, "
"debugging, and coverage analysis tools."
msgstr ""
# 2911edeccaa145a9a8bb6d3296b71632
#: ../src/Doc/c-api/init.rst:963
msgid ""
"Starting with Python 2.2, the implementation of this facility was "
"substantially revised, and an interface from C was added. This C interface "
"allows the profiling or tracing code to avoid the overhead of calling "
"through Python-level callable objects, making a direct C function call "
"instead. The essential attributes of the facility have not changed; the "
"interface allows trace functions to be installed per-thread, and the basic "
"events reported to the trace function are the same as had been reported to "
"the Python-level trace functions in previous versions."
msgstr ""
# 8e4330873edd4b0ba7c53cf691927b33
#: ../src/Doc/c-api/init.rst:975
msgid ""
"The type of the trace function registered using :c:func:`PyEval_SetProfile` "
"and :c:func:`PyEval_SetTrace`. The first parameter is the object passed to "
"the registration function as *obj*, *frame* is the frame object to which the "
"event pertains, *what* is one of the constants :const:`PyTrace_CALL`, :const:"
"`PyTrace_EXCEPTION`, :const:`PyTrace_LINE`, :const:`PyTrace_RETURN`, :const:"
"`PyTrace_C_CALL`, :const:`PyTrace_C_EXCEPTION`, or :const:"
"`PyTrace_C_RETURN`, and *arg* depends on the value of *what*:"
msgstr ""
# 55815e224fac48cb9956e3746e7ec46e
#: ../src/Doc/c-api/init.rst:984
msgid "Value of *what*"
msgstr ""
# 26a91ca701b648e882d826bb419d4bbb
#: ../src/Doc/c-api/init.rst:984
msgid "Meaning of *arg*"
msgstr ""
# 807ecd167f7c405baa2c30e4070edbc6
#: ../src/Doc/c-api/init.rst:986
msgid ":const:`PyTrace_CALL`"
msgstr ""
# 0b28a4b1504f4042a793c4c35f0fcf40
# c82376e35ca84e7980cd7ded649eea26
#: ../src/Doc/c-api/init.rst:986 ../src/Doc/c-api/init.rst:991
msgid "Always *NULL*."
msgstr ""
# 3e6e08eb355240c1ad71cb10dd34e34f
#: ../src/Doc/c-api/init.rst:988
msgid ":const:`PyTrace_EXCEPTION`"
msgstr ""
# ddcd533d6da04ebd8525ddccfe20671c
#: ../src/Doc/c-api/init.rst:988
msgid "Exception information as returned by :func:`sys.exc_info`."
msgstr ""
# 033b1f35b70a440ca5612ed1866609ed
#: ../src/Doc/c-api/init.rst:991
msgid ":const:`PyTrace_LINE`"
msgstr ""
# 50a815bb81b74b2688f729ba55aa572d
#: ../src/Doc/c-api/init.rst:993
msgid ":const:`PyTrace_RETURN`"
msgstr ""
# 7c184ed455e0451dbff9cc277c4c8bdd
#: ../src/Doc/c-api/init.rst:993
msgid ""
"Value being returned to the caller, or *NULL* if caused by an exception."
msgstr ""
# 6ab3db3acb5c49618b435869c447a7ef
#: ../src/Doc/c-api/init.rst:996
msgid ":const:`PyTrace_C_CALL`"
msgstr ""
# 6aa8eda40f7447be8335444be344be6c
# 395184982b6c481cac3023d3fd0caf05
# bebcefea73fa462b87655a0b0bd9a185
#: ../src/Doc/c-api/init.rst:996 ../src/Doc/c-api/init.rst:998
#: ../src/Doc/c-api/init.rst:1000
msgid "Function object being called."
msgstr ""
# 793cdd9852814ebe8b96a7dcbec48269
#: ../src/Doc/c-api/init.rst:998
msgid ":const:`PyTrace_C_EXCEPTION`"
msgstr ""
# 590fd27b960c4419acc2a5d839d1b944
#: ../src/Doc/c-api/init.rst:1000
msgid ":const:`PyTrace_C_RETURN`"
msgstr ""
# 0feaa5869426452d9fb8717b06b66b3e
#: ../src/Doc/c-api/init.rst:1006
msgid ""
"The value of the *what* parameter to a :c:type:`Py_tracefunc` function when "
"a new call to a function or method is being reported, or a new entry into a "
"generator. Note that the creation of the iterator for a generator function "
"is not reported as there is no control transfer to the Python bytecode in "
"the corresponding frame."
msgstr ""
# b253e6b1675b404f9ab0329857885044
#: ../src/Doc/c-api/init.rst:1015
msgid ""
"The value of the *what* parameter to a :c:type:`Py_tracefunc` function when "
"an exception has been raised. The callback function is called with this "
"value for *what* when after any bytecode is processed after which the "
"exception becomes set within the frame being executed. The effect of this "
"is that as exception propagation causes the Python stack to unwind, the "
"callback is called upon return to each frame as the exception propagates. "
"Only trace functions receives these events; they are not needed by the "
"profiler."
msgstr ""
# fb78287cef404b27aed77b53073bf678
#: ../src/Doc/c-api/init.rst:1026
msgid ""
"The value passed as the *what* parameter to a trace function (but not a "
"profiling function) when a line-number event is being reported."
msgstr ""
# aca1c55b95e541b5a86269f3de23c6ab
#: ../src/Doc/c-api/init.rst:1032
msgid ""
"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when "
"a call is returning without propagating an exception."
msgstr ""
# d219d18132d74d7cb66638a721f67500
#: ../src/Doc/c-api/init.rst:1038
msgid ""
"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when "
"a C function is about to be called."
msgstr ""
# f8677b5d6e424eb4aa8548ebdfba20ce
#: ../src/Doc/c-api/init.rst:1044
msgid ""
"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when "
"a C function has raised an exception."
msgstr ""
# 2d7f32ebe05a48298205b43b4b8b0ed1
#: ../src/Doc/c-api/init.rst:1050
msgid ""
"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when "
"a C function has returned."
msgstr ""
# e853ff3b168b46549dac4b0e0965afb5
#: ../src/Doc/c-api/init.rst:1056
msgid ""
"Set the profiler function to *func*. The *obj* parameter is passed to the "
"function as its first parameter, and may be any Python object, or *NULL*. "
"If the profile function needs to maintain state, using a different value for "
"*obj* for each thread provides a convenient and thread-safe place to store "
"it. The profile function is called for all monitored events except the line-"
"number events."
msgstr ""
# 74549e6117f04dada76f81be82be36d5
#: ../src/Doc/c-api/init.rst:1066
msgid ""
"Set the tracing function to *func*. This is similar to :c:func:"
"`PyEval_SetProfile`, except the tracing function does receive line-number "
"events."
msgstr ""
# 5a089afe7cbb4a8589b620999ce57185
#: ../src/Doc/c-api/init.rst:1072
msgid ""
"Return a tuple of function call counts. There are constants defined for the "
"positions within the tuple:"
msgstr ""
#: ../src/Doc/c-api/init.rst:1076
msgid "Name"
msgstr "Nom"
# f67a501e20c647a1988795e4c50bc8e7
#: ../src/Doc/c-api/init.rst:1076
msgid "Value"
msgstr ""
# 81f682785def4c778e9a73f866790403
#: ../src/Doc/c-api/init.rst:1078
msgid ":const:`PCALL_ALL`"
msgstr ""
# 202b205cf79e4e0e95f9b02c640559b2
#: ../src/Doc/c-api/init.rst:1078
msgid "0"
msgstr ""
# fd558f4b4a384b76b1c4184a67dd4f0b
#: ../src/Doc/c-api/init.rst:1080
msgid ":const:`PCALL_FUNCTION`"
msgstr ""
# 4ae7b66c06e04cb3b2f848d2816de3da
#: ../src/Doc/c-api/init.rst:1080
msgid "1"
msgstr ""
# a1ac7ebf33504761a3822db034ff2a1a
#: ../src/Doc/c-api/init.rst:1082
msgid ":const:`PCALL_FAST_FUNCTION`"
msgstr ""
# 276876eb09b64d9cbbd0273c043a3814
#: ../src/Doc/c-api/init.rst:1082
msgid "2"
msgstr ""
# 87969597e7904737a2922f0ea5adf95c
#: ../src/Doc/c-api/init.rst:1084
msgid ":const:`PCALL_FASTER_FUNCTION`"
msgstr ""
# 7b6e392baf3c4370921b97fedaef7ba9
#: ../src/Doc/c-api/init.rst:1084
msgid "3"
msgstr ""
# f30057c052ce4af6b3468fcbe3483f4f
#: ../src/Doc/c-api/init.rst:1086
msgid ":const:`PCALL_METHOD`"
msgstr ""
# 02424ee0ec7b46c2a56d041c17506c80
#: ../src/Doc/c-api/init.rst:1086
msgid "4"
msgstr ""
# b6d2bfc9f82f4f78ab1eeedee6a55f2f
#: ../src/Doc/c-api/init.rst:1088
msgid ":const:`PCALL_BOUND_METHOD`"
msgstr ""
# 566159816458463f992bd7d4fb66ec45
#: ../src/Doc/c-api/init.rst:1088
msgid "5"
msgstr ""
# 50635062b7ea4136a980bd5e221faf74
#: ../src/Doc/c-api/init.rst:1090
msgid ":const:`PCALL_CFUNCTION`"
msgstr ""
# ce3f526611ef4b88914804b7d3dd9111
#: ../src/Doc/c-api/init.rst:1090
msgid "6"
msgstr ""
# c03bb9a2d4b64400bfdb8ad95c7c6b23
#: ../src/Doc/c-api/init.rst:1092
msgid ":const:`PCALL_TYPE`"
msgstr ""
# e6a4562e5a804d7aae784ea0a7b7ed95
#: ../src/Doc/c-api/init.rst:1092
msgid "7"
msgstr ""
# 5601252dce424f9aa1ff47ba12f3605b
#: ../src/Doc/c-api/init.rst:1094
msgid ":const:`PCALL_GENERATOR`"
msgstr ""
# a6652045cb004f42bab10ba738459f9d
#: ../src/Doc/c-api/init.rst:1094
msgid "8"
msgstr ""
# b351bd1835704d0db7b7f3fa7dd4ede6
#: ../src/Doc/c-api/init.rst:1096
msgid ":const:`PCALL_OTHER`"
msgstr ""
# 1ca50c24a2ed46d29515ee99c664ed0a
#: ../src/Doc/c-api/init.rst:1096
msgid "9"
msgstr ""
# 784fb1f35d7546f5bf71fe268a34b332
#: ../src/Doc/c-api/init.rst:1098
msgid ":const:`PCALL_POP`"
msgstr ""
# bbf7bb9465b041bd9ad30a1453a3d3e7
#: ../src/Doc/c-api/init.rst:1098
msgid "10"
msgstr ""
# c23b75c1e5ee414791defd7787acc761
#: ../src/Doc/c-api/init.rst:1101
msgid ""
":const:`PCALL_FAST_FUNCTION` means no argument tuple needs to be created. :"
"const:`PCALL_FASTER_FUNCTION` means that the fast-path frame setup code is "
"used."
msgstr ""
# 678180cada6045d3bb7befadf2122242
#: ../src/Doc/c-api/init.rst:1104
msgid ""
"If there is a method call where the call can be optimized by changing the "
"argument tuple and calling the function directly, it gets recorded twice."
msgstr ""
# 9854aea0b9b54653acd2134ebc4ac9e2
#: ../src/Doc/c-api/init.rst:1108
msgid ""
"This function is only present if Python is compiled with :const:"
"`CALL_PROFILE` defined."
msgstr ""
#: ../src/Doc/c-api/init.rst:1114
msgid "Advanced Debugger Support"
msgstr "Support avancé du debugger"
#: ../src/Doc/c-api/init.rst:1119
msgid ""
"These functions are only intended to be used by advanced debugging tools."
msgstr ""
# 3b9d4318bbe548c4850ecda7921a8968
#: ../src/Doc/c-api/init.rst:1124
msgid ""
"Return the interpreter state object at the head of the list of all such "
"objects."
msgstr ""
# 7eadec718a3f47e2add48e117cd4381d
#: ../src/Doc/c-api/init.rst:1131
msgid ""
"Return the next interpreter state object after *interp* from the list of all "
"such objects."
msgstr ""
# c665d20b26f149b5a8448e686bcf5225
#: ../src/Doc/c-api/init.rst:1139
msgid ""
"Return the a pointer to the first :c:type:`PyThreadState` object in the list "
"of threads associated with the interpreter *interp*."
msgstr ""
# 1d3ce99fa4bd42798e62a1a1cc4eea96
#: ../src/Doc/c-api/init.rst:1147
msgid ""
"Return the next thread state object after *tstate* from the list of all such "
"objects belonging to the same :c:type:`PyInterpreterState` object."
msgstr ""
#: ../src/Doc/c-api/int.rst:6
#, fuzzy
msgid "Plain Integer Objects"
msgstr "Objets association"
# 24351b06555c42099882f9f3886e3192
#: ../src/Doc/c-api/int.rst:13
msgid "This subtype of :c:type:`PyObject` represents a Python integer object."
msgstr ""
# ea2b3ca284d94f869fb66ce6477fbdef
#: ../src/Doc/c-api/int.rst:20
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python plain integer "
"type. This is the same object as ``int`` and ``types.IntType``."
msgstr ""
# 7c773759a98d4709a5134dc9a2b66494
#: ../src/Doc/c-api/int.rst:26
msgid ""
"Return true if *o* is of type :c:data:`PyInt_Type` or a subtype of :c:data:"
"`PyInt_Type`."
msgstr ""
# 0244df8b9ac64f298d0f9777780d054b
#: ../src/Doc/c-api/int.rst:35
msgid ""
"Return true if *o* is of type :c:data:`PyInt_Type`, but not a subtype of :c:"
"data:`PyInt_Type`."
msgstr ""
# 39979e8d79a54efab899b4eae2f8a2fa
#: ../src/Doc/c-api/int.rst:43
msgid ""
"Return a new :c:type:`PyIntObject` or :c:type:`PyLongObject` based on the "
"string value in *str*, which is interpreted according to the radix in "
"*base*. If *pend* is non-*NULL*, ``*pend`` will point to the first "
"character in *str* which follows the representation of the number. If "
"*base* is ``0``, the radix will be determined based on the leading "
"characters of *str*: if *str* starts with ``'0x'`` or ``'0X'``, radix 16 "
"will be used; if *str* starts with ``'0'``, radix 8 will be used; otherwise "
"radix 10 will be used. If *base* is not ``0``, it must be between ``2`` and "
"``36``, inclusive. Leading spaces are ignored. If there are no digits, :"
"exc:`ValueError` will be raised. If the string represents a number too "
"large to be contained within the machine's :c:type:`long int` type and "
"overflow warnings are being suppressed, a :c:type:`PyLongObject` will be "
"returned. If overflow warnings are not being suppressed, *NULL* will be "
"returned in this case."
msgstr ""
# d4d5f5292d494b088e717907304f4cb5
#: ../src/Doc/c-api/int.rst:60
msgid "Create a new integer object with a value of *ival*."
msgstr ""
# 70d82a4936a741b5bf6fe098e62fdc72
#: ../src/Doc/c-api/int.rst:62
msgid ""
"The current implementation keeps an array of integer objects for all "
"integers between ``-5`` and ``256``, when you create an int in that range "
"you actually just get back a reference to the existing object. So it should "
"be possible to change the value of ``1``. I suspect the behaviour of Python "
"in this case is undefined. :-)"
msgstr ""
# 7814cf0d388446d4afde232c7d75eda0
#: ../src/Doc/c-api/int.rst:71
msgid ""
"Create a new integer object with a value of *ival*. If the value is larger "
"than ``LONG_MAX`` or smaller than ``LONG_MIN``, a long integer object is "
"returned."
msgstr ""
# ad964a6a87e54cf8b4bbf32fdf0e761d
#: ../src/Doc/c-api/int.rst:80
msgid ""
"Create a new integer object with a value of *ival*. If the value exceeds "
"``LONG_MAX``, a long integer object is returned."
msgstr ""
# df2d57408b7545fdabffb35d344588ab
#: ../src/Doc/c-api/int.rst:88
msgid ""
"Will first attempt to cast the object to a :c:type:`PyIntObject`, if it is "
"not already one, and then return its value. If there is an error, ``-1`` is "
"returned, and the caller should check ``PyErr_Occurred()`` to find out "
"whether there was an error, or whether the value just happened to be -1."
msgstr ""
# 00ab2699ebf94205a811ba1ae8ff5ae8
#: ../src/Doc/c-api/int.rst:96
msgid "Return the value of the object *io*. No error checking is performed."
msgstr ""
# ad042e6533ac4680b7110e678860d836
#: ../src/Doc/c-api/int.rst:101
msgid ""
"Will first attempt to cast the object to a :c:type:`PyIntObject` or :c:type:"
"`PyLongObject`, if it is not already one, and then return its value as "
"unsigned long. This function does not check for overflow."
msgstr ""
# e1d34be3a6d94afdb5d8b322dafe7b99
#: ../src/Doc/c-api/int.rst:110
msgid ""
"Will first attempt to cast the object to a :c:type:`PyIntObject` or :c:type:"
"`PyLongObject`, if it is not already one, and then return its value as "
"unsigned long long, without checking for overflow."
msgstr ""
# 31f9f18f46814ff49d0c5add7c975b15
#: ../src/Doc/c-api/int.rst:119
msgid ""
"Will first attempt to cast the object to a :c:type:`PyIntObject` or :c:type:"
"`PyLongObject`, if it is not already one, and then return its value as :c:"
"type:`Py_ssize_t`."
msgstr ""
# dc8c92bf563f4e409d77051c300bd8f5
#: ../src/Doc/c-api/int.rst:130
msgid ""
"Return the system's idea of the largest integer it can handle (:const:"
"`LONG_MAX`, as defined in the system header files)."
msgstr ""
# 4edcf2b1ff6a407ca1db28b352c46033
#: ../src/Doc/c-api/int.rst:136
msgid ""
"Clear the integer free list. Return the number of items that could not be "
"freed."
msgstr ""
#: ../src/Doc/c-api/intro.rst:8
msgid "Introduction"
msgstr "Introduction"
#: ../src/Doc/c-api/intro.rst:10
msgid ""
"The Application Programmer's Interface to Python gives C and C++ programmers "
"access to the Python interpreter at a variety of levels. The API is equally "
"usable from C++, but for brevity it is generally referred to as the Python/C "
"API. There are two fundamentally different reasons for using the Python/C "
"API. The first reason is to write *extension modules* for specific purposes; "
"these are C modules that extend the Python interpreter. This is probably "
"the most common use. The second reason is to use Python as a component in a "
"larger application; this technique is generally referred to as :dfn:"
"`embedding` Python in an application."
msgstr ""
#: ../src/Doc/c-api/intro.rst:20
msgid ""
"Writing an extension module is a relatively well-understood process, where "
"a \"cookbook\" approach works well. There are several tools that automate "
"the process to some extent. While people have embedded Python in other "
"applications since its early existence, the process of embedding Python is "
"less straightforward than writing an extension."
msgstr ""
#: ../src/Doc/c-api/intro.rst:26
msgid ""
"Many API functions are useful independent of whether you're embedding or "
"extending Python; moreover, most applications that embed Python will need "
"to provide a custom extension as well, so it's probably a good idea to "
"become familiar with writing an extension before attempting to embed Python "
"in a real application."
msgstr ""
#: ../src/Doc/c-api/intro.rst:36
msgid "Include Files"
msgstr ""
#: ../src/Doc/c-api/intro.rst:38
msgid ""
"All function, type and macro definitions needed to use the Python/C API are "
"included in your code by the following line::"
msgstr ""
# c87aadefa2ed4883b14c7e1d90c5c711
#: ../src/Doc/c-api/intro.rst:43
msgid ""
"This implies inclusion of the following standard headers: ``<stdio.h>``, "
"``<string.h>``, ``<errno.h>``, ``<limits.h>``, ``<assert.h>`` and ``<stdlib."
"h>`` (if available)."
msgstr ""
#: ../src/Doc/c-api/intro.rst:49
msgid ""
"Since Python may define some pre-processor definitions which affect the "
"standard headers on some systems, you *must* include :file:`Python.h` before "
"any standard headers are included."
msgstr ""
#: ../src/Doc/c-api/intro.rst:53
msgid ""
"All user visible names defined by Python.h (except those defined by the "
"included standard headers) have one of the prefixes ``Py`` or ``_Py``. "
"Names beginning with ``_Py`` are for internal use by the Python "
"implementation and should not be used by extension writers. Structure member "
"names do not have a reserved prefix."
msgstr ""
#: ../src/Doc/c-api/intro.rst:58
msgid ""
"**Important:** user code should never define names that begin with ``Py`` or "
"``_Py``. This confuses the reader, and jeopardizes the portability of the "
"user code to future Python versions, which may define additional names "
"beginning with one of these prefixes."
msgstr ""
#: ../src/Doc/c-api/intro.rst:63
msgid ""
"The header files are typically installed with Python. On Unix, these are "
"located in the directories :file:`{prefix}/include/pythonversion/` and :file:"
"`{exec_prefix}/include/pythonversion/`, where :envvar:`prefix` and :envvar:"
"`exec_prefix` are defined by the corresponding parameters to Python's :"
"program:`configure` script and *version* is ``sys.version[:3]``. On "
"Windows, the headers are installed in :file:`{prefix}/include`, where :"
"envvar:`prefix` is the installation directory specified to the installer."
msgstr ""
#: ../src/Doc/c-api/intro.rst:71
msgid ""
"To include the headers, place both directories (if different) on your "
"compiler's search path for includes. Do *not* place the parent directories "
"on the search path and then use ``#include <pythonX.Y/Python.h>``; this will "
"break on multi-platform builds since the platform independent headers under :"
"envvar:`prefix` include the platform specific headers from :envvar:"
"`exec_prefix`."
msgstr ""
#: ../src/Doc/c-api/intro.rst:78
msgid ""
"C++ users should note that though the API is defined entirely using C, the "
"header files do properly declare the entry points to be ``extern \"C\"``, so "
"there is no need to do anything special to use the API from C++."
msgstr ""
#: ../src/Doc/c-api/intro.rst:86
msgid "Objects, Types and Reference Counts"
msgstr ""
# 2b45dce54b934dc3ab18981cf5bd1274
#: ../src/Doc/c-api/intro.rst:90
msgid ""
"Most Python/C API functions have one or more arguments as well as a return "
"value of type :c:type:`PyObject\\*`. This type is a pointer to an opaque "
"data type representing an arbitrary Python object. Since all Python object "
"types are treated the same way by the Python language in most situations (e."
"g., assignments, scope rules, and argument passing), it is only fitting that "
"they should be represented by a single C type. Almost all Python objects "
"live on the heap: you never declare an automatic or static variable of type :"
"c:type:`PyObject`, only pointer variables of type :c:type:`PyObject\\*` can "
"be declared. The sole exception are the type objects; since these must "
"never be deallocated, they are typically static :c:type:`PyTypeObject` "
"objects."
msgstr ""
#: ../src/Doc/c-api/intro.rst:101
msgid ""
"All Python objects (even Python integers) have a :dfn:`type` and a :dfn:"
"`reference count`. An object's type determines what kind of object it is (e."
"g., an integer, a list, or a user-defined function; there are many more as "
"explained in :ref:`types`). For each of the well-known types there is a "
"macro to check whether an object is of that type; for instance, "
"``PyList_Check(a)`` is true if (and only if) the object pointed to by *a* is "
"a Python list."
msgstr ""
#: ../src/Doc/c-api/intro.rst:112
msgid "Reference Counts"
msgstr ""
#: ../src/Doc/c-api/intro.rst:114
msgid ""
"The reference count is important because today's computers have a finite "
"(and often severely limited) memory size; it counts how many different "
"places there are that have a reference to an object. Such a place could be "
"another object, or a global (or static) C variable, or a local variable in "
"some C function. When an object's reference count becomes zero, the object "
"is deallocated. If it contains references to other objects, their "
"reference count is decremented. Those other objects may be deallocated in "
"turn, if this decrement makes their reference count become zero, and so on. "
"(There's an obvious problem with objects that reference each other here; "
"for now, the solution is \"don't do that.\")"
msgstr ""
# 15aaafaa70d34763872358d41bf68781
#: ../src/Doc/c-api/intro.rst:129
msgid ""
"Reference counts are always manipulated explicitly. The normal way is to "
"use the macro :c:func:`Py_INCREF` to increment an object's reference count "
"by one, and :c:func:`Py_DECREF` to decrement it by one. The :c:func:"
"`Py_DECREF` macro is considerably more complex than the incref one, since it "
"must check whether the reference count becomes zero and then cause the "
"object's deallocator to be called. The deallocator is a function pointer "
"contained in the object's type structure. The type-specific deallocator "
"takes care of decrementing the reference counts for other objects contained "
"in the object if this is a compound object type, such as a list, as well as "
"performing any additional finalization that's needed. There's no chance "
"that the reference count can overflow; at least as many bits are used to "
"hold the reference count as there are distinct memory locations in virtual "
"memory (assuming ``sizeof(Py_ssize_t) >= sizeof(void*)``). Thus, the "
"reference count increment is a simple operation."
msgstr ""
#: ../src/Doc/c-api/intro.rst:143
msgid ""
"It is not necessary to increment an object's reference count for every "
"local variable that contains a pointer to an object. In theory, the "
"object's reference count goes up by one when the variable is made to point "
"to it and it goes down by one when the variable goes out of scope. "
"However, these two cancel each other out, so at the end the reference count "
"hasn't changed. The only real reason to use the reference count is to "
"prevent the object from being deallocated as long as our variable is "
"pointing to it. If we know that there is at least one other reference to "
"the object that lives at least as long as our variable, there is no need to "
"increment the reference count temporarily. An important situation where "
"this arises is in objects that are passed as arguments to C functions in an "
"extension module that are called from Python; the call mechanism guarantees "
"to hold a reference to every argument for the duration of the call."
msgstr ""
# 4afd25961de144e7ab5ca1f6103d3ca5
#: ../src/Doc/c-api/intro.rst:157
msgid ""
"However, a common pitfall is to extract an object from a list and hold on to "
"it for a while without incrementing its reference count. Some other "
"operation might conceivably remove the object from the list, decrementing "
"its reference count and possible deallocating it. The real danger is that "
"innocent-looking operations may invoke arbitrary Python code which could do "
"this; there is a code path which allows control to flow back to the user "
"from a :c:func:`Py_DECREF`, so almost any operation is potentially dangerous."
msgstr ""
# 9461bffa2a674b3fbe360a35e2594afb
#: ../src/Doc/c-api/intro.rst:165
msgid ""
"A safe approach is to always use the generic operations (functions whose "
"name begins with ``PyObject_``, ``PyNumber_``, ``PySequence_`` or "
"``PyMapping_``). These operations always increment the reference count of "
"the object they return. This leaves the caller with the responsibility to "
"call :c:func:`Py_DECREF` when they are done with the result; this soon "
"becomes second nature."
msgstr ""
#: ../src/Doc/c-api/intro.rst:175
msgid "Reference Count Details"
msgstr ""
# 58ef65c1aac64fbd9ee436fee5a08b20
#: ../src/Doc/c-api/intro.rst:177
msgid ""
"The reference count behavior of functions in the Python/C API is best "
"explained in terms of *ownership of references*. Ownership pertains to "
"references, never to objects (objects are not owned: they are always "
"shared). \"Owning a reference\" means being responsible for calling "
"Py_DECREF on it when the reference is no longer needed. Ownership can also "
"be transferred, meaning that the code that receives ownership of the "
"reference then becomes responsible for eventually decref'ing it by calling :"
"c:func:`Py_DECREF` or :c:func:`Py_XDECREF` when it's no longer needed---or "
"passing on this responsibility (usually to its caller). When a function "
"passes ownership of a reference on to its caller, the caller is said to "
"receive a *new* reference. When no ownership is transferred, the caller is "
"said to *borrow* the reference. Nothing needs to be done for a borrowed "
"reference."
msgstr ""
#: ../src/Doc/c-api/intro.rst:190
msgid ""
"Conversely, when a calling function passes in a reference to an object, "
"there are two possibilities: the function *steals* a reference to the "
"object, or it does not. *Stealing a reference* means that when you pass a "
"reference to a function, that function assumes that it now owns that "
"reference, and you are not responsible for it any longer."
msgstr ""
# ebc6979c16da46ddadb714f5fa03500d
#: ../src/Doc/c-api/intro.rst:200
msgid ""
"Few functions steal references; the two notable exceptions are :c:func:"
"`PyList_SetItem` and :c:func:`PyTuple_SetItem`, which steal a reference to "
"the item (but not to the tuple or list into which the item is put!). These "
"functions were designed to steal a reference because of a common idiom for "
"populating a tuple or list with newly created objects; for example, the code "
"to create the tuple ``(1, 2, \"three\")`` could look like this (forgetting "
"about error handling for the moment; a better way to code this is shown "
"below)::"
msgstr ""
# 2b3894608fb84fa296fdb30d8647bbf6
#: ../src/Doc/c-api/intro.rst:215
msgid ""
"Here, :c:func:`PyInt_FromLong` returns a new reference which is immediately "
"stolen by :c:func:`PyTuple_SetItem`. When you want to keep using an object "
"although the reference to it will be stolen, use :c:func:`Py_INCREF` to grab "
"another reference before calling the reference-stealing function."
msgstr ""
# 656e72b8fd224721b108a677c829e9ad
#: ../src/Doc/c-api/intro.rst:220
msgid ""
"Incidentally, :c:func:`PyTuple_SetItem` is the *only* way to set tuple "
"items; :c:func:`PySequence_SetItem` and :c:func:`PyObject_SetItem` refuse to "
"do this since tuples are an immutable data type. You should only use :c:"
"func:`PyTuple_SetItem` for tuples that you are creating yourself."
msgstr ""
# 5f25cc241aeb473ea3e4e799bf60f4b3
#: ../src/Doc/c-api/intro.rst:225
msgid ""
"Equivalent code for populating a list can be written using :c:func:"
"`PyList_New` and :c:func:`PyList_SetItem`."
msgstr ""
# 68ad03c814324653977ce83bddfd7243
#: ../src/Doc/c-api/intro.rst:228
msgid ""
"However, in practice, you will rarely use these ways of creating and "
"populating a tuple or list. There's a generic function, :c:func:"
"`Py_BuildValue`, that can create most common objects from C values, directed "
"by a :dfn:`format string`. For example, the above two blocks of code could "
"be replaced by the following (which also takes care of the error checking)::"
msgstr ""
# 5b43d3e4f6bc4a2ab9e4cc85c0e0b167
#: ../src/Doc/c-api/intro.rst:239
msgid ""
"It is much more common to use :c:func:`PyObject_SetItem` and friends with "
"items whose references you are only borrowing, like arguments that were "
"passed in to the function you are writing. In that case, their behaviour "
"regarding reference counts is much saner, since you don't have to increment "
"a reference count so you can give a reference away (\"have it be stolen\"). "
"For example, this function sets all items of a list (actually, any mutable "
"sequence) to a given item::"
msgstr ""
# 48d2257bc2c74ec19fb76614885f956d
#: ../src/Doc/c-api/intro.rst:269
msgid ""
"The situation is slightly different for function return values. While "
"passing a reference to most functions does not change your ownership "
"responsibilities for that reference, many functions that return a reference "
"to an object give you ownership of the reference. The reason is simple: in "
"many cases, the returned object is created on the fly, and the reference "
"you get is the only reference to the object. Therefore, the generic "
"functions that return object references, like :c:func:`PyObject_GetItem` "
"and :c:func:`PySequence_GetItem`, always return a new reference (the caller "
"becomes the owner of the reference)."
msgstr ""
# 79afa4895db34766bbff82f4d319107d
#: ../src/Doc/c-api/intro.rst:278
msgid ""
"It is important to realize that whether you own a reference returned by a "
"function depends on which function you call only --- *the plumage* (the type "
"of the object passed as an argument to the function) *doesn't enter into it!"
"* Thus, if you extract an item from a list using :c:func:`PyList_GetItem`, "
"you don't own the reference --- but if you obtain the same item from the "
"same list using :c:func:`PySequence_GetItem` (which happens to take exactly "
"the same arguments), you do own a reference to the returned object."
msgstr ""
# fdc9af479c6f4a2b940f491b06761f7d
#: ../src/Doc/c-api/intro.rst:290
msgid ""
"Here is an example of how you could write a function that computes the sum "
"of the items in a list of integers; once using :c:func:`PyList_GetItem`, "
"and once using :c:func:`PySequence_GetItem`. ::"
msgstr ""
#: ../src/Doc/c-api/intro.rst:342
msgid "Types"
msgstr ""
# d5bced4796cb4c779dc8a60189c65856
#: ../src/Doc/c-api/intro.rst:344
msgid ""
"There are few other data types that play a significant role in the Python/C "
"API; most are simple C types such as :c:type:`int`, :c:type:`long`, :c:type:"
"`double` and :c:type:`char\\*`. A few structure types are used to describe "
"static tables used to list the functions exported by a module or the data "
"attributes of a new object type, and another is used to describe the value "
"of a complex number. These will be discussed together with the functions "
"that use them."
msgstr ""
#: ../src/Doc/c-api/intro.rst:356
msgid "Exceptions"
msgstr "Exceptions"
#: ../src/Doc/c-api/intro.rst:358
msgid ""
"The Python programmer only needs to deal with exceptions if specific error "
"handling is required; unhandled exceptions are automatically propagated to "
"the caller, then to the caller's caller, and so on, until they reach the top-"
"level interpreter, where they are reported to the user accompanied by a "
"stack traceback."
msgstr ""
# fe544a2be88c4bd3b51a4af5824fb07c
#: ../src/Doc/c-api/intro.rst:366
msgid ""
"For C programmers, however, error checking always has to be explicit. All "
"functions in the Python/C API can raise exceptions, unless an explicit claim "
"is made otherwise in a function's documentation. In general, when a "
"function encounters an error, it sets an exception, discards any object "
"references that it owns, and returns an error indicator. If not documented "
"otherwise, this indicator is either *NULL* or ``-1``, depending on the "
"function's return type. A few functions return a Boolean true/false result, "
"with false indicating an error. Very few functions return no explicit error "
"indicator or have an ambiguous return value, and require explicit testing "
"for errors with :c:func:`PyErr_Occurred`. These exceptions are always "
"explicitly documented."
msgstr ""
# 6164d993476b48909ccbc098a8f02056
#: ../src/Doc/c-api/intro.rst:381
msgid ""
"Exception state is maintained in per-thread storage (this is equivalent to "
"using global storage in an unthreaded application). A thread can be in one "
"of two states: an exception has occurred, or not. The function :c:func:"
"`PyErr_Occurred` can be used to check for this: it returns a borrowed "
"reference to the exception type object when an exception has occurred, and "
"*NULL* otherwise. There are a number of functions to set the exception "
"state: :c:func:`PyErr_SetString` is the most common (though not the most "
"general) function to set the exception state, and :c:func:`PyErr_Clear` "
"clears the exception state."
msgstr ""
# 268eb884fc2043bc9035ea3e0abb4a0a
#: ../src/Doc/c-api/intro.rst:396
msgid ""
"The full exception state consists of three objects (all of which can be "
"*NULL*): the exception type, the corresponding exception value, and the "
"traceback. These have the same meanings as the Python objects ``sys."
"exc_type``, ``sys.exc_value``, and ``sys.exc_traceback``; however, they are "
"not the same: the Python objects represent the last exception being handled "
"by a Python :keyword:`try` ... :keyword:`except` statement, while the C "
"level exception state only exists while an exception is being passed on "
"between C functions until it reaches the Python bytecode interpreter's main "
"loop, which takes care of transferring it to ``sys.exc_type`` and friends."
msgstr ""
#: ../src/Doc/c-api/intro.rst:408
msgid ""
"Note that starting with Python 1.5, the preferred, thread-safe way to access "
"the exception state from Python code is to call the function :func:`sys."
"exc_info`, which returns the per-thread exception state for Python code. "
"Also, the semantics of both ways to access the exception state have changed "
"so that a function which catches an exception will save and restore its "
"thread's exception state so as to preserve the exception state of its "
"caller. This prevents common bugs in exception handling code caused by an "
"innocent-looking function overwriting the exception being handled; it also "
"reduces the often unwanted lifetime extension for objects that are "
"referenced by the stack frames in the traceback."
msgstr ""
#: ../src/Doc/c-api/intro.rst:419
msgid ""
"As a general principle, a function that calls another function to perform "
"some task should check whether the called function raised an exception, and "
"if so, pass the exception state on to its caller. It should discard any "
"object references that it owns, and return an error indicator, but it "
"should *not* set another exception --- that would overwrite the exception "
"that was just raised, and lose important information about the exact cause "
"of the error."
msgstr ""
# 7168a1d998ba4d869fbd4531e7452a54
#: ../src/Doc/c-api/intro.rst:428
msgid ""
"A simple example of detecting exceptions and passing them on is shown in "
"the :c:func:`sum_sequence` example above. It so happens that this example "
"doesn't need to clean up any owned references when it detects an error. The "
"following example function shows some error cleanup. First, to remind you "
"why you like Python, we show the equivalent Python code::"
msgstr ""
#: ../src/Doc/c-api/intro.rst:443
msgid "Here is the corresponding C code, in all its glory::"
msgstr ""
# 1f48917a12fd4f779a65dc1619696593
#: ../src/Doc/c-api/intro.rst:495
msgid ""
"This example represents an endorsed use of the ``goto`` statement in C! It "
"illustrates the use of :c:func:`PyErr_ExceptionMatches` and :c:func:"
"`PyErr_Clear` to handle specific exceptions, and the use of :c:func:"
"`Py_XDECREF` to dispose of owned references that may be *NULL* (note the "
"``'X'`` in the name; :c:func:`Py_DECREF` would crash when confronted with a "
"*NULL* reference). It is important that the variables used to hold owned "
"references are initialized to *NULL* for this to work; likewise, the "
"proposed return value is initialized to ``-1`` (failure) and only set to "
"success after the final call made is successful."
msgstr ""
#: ../src/Doc/c-api/intro.rst:509
msgid "Embedding Python"
msgstr ""
#: ../src/Doc/c-api/intro.rst:511
msgid ""
"The one important task that only embedders (as opposed to extension writers) "
"of the Python interpreter have to worry about is the initialization, and "
"possibly the finalization, of the Python interpreter. Most functionality of "
"the interpreter can only be used after the interpreter has been initialized."
msgstr ""
# f09087750dfb40f8bd355e56845878af
#: ../src/Doc/c-api/intro.rst:525
msgid ""
"The basic initialization function is :c:func:`Py_Initialize`. This "
"initializes the table of loaded modules, and creates the fundamental "
"modules :mod:`__builtin__`, :mod:`__main__`, :mod:`sys`, and :mod:"
"`exceptions`. It also initializes the module search path (``sys.path``)."
msgstr ""
# 20f3109745ed426aa5aa3a67938b012c
#: ../src/Doc/c-api/intro.rst:532
msgid ""
":c:func:`Py_Initialize` does not set the \"script argument list\" (``sys."
"argv``). If this variable is needed by Python code that will be executed "
"later, it must be set explicitly with a call to ``PySys_SetArgvEx(argc, "
"argv, updatepath)`` after the call to :c:func:`Py_Initialize`."
msgstr ""
# 64c5ef23ed4e4f42b8f3d2ea8a4654c6
#: ../src/Doc/c-api/intro.rst:537
msgid ""
"On most systems (in particular, on Unix and Windows, although the details "
"are slightly different), :c:func:`Py_Initialize` calculates the module "
"search path based upon its best guess for the location of the standard "
"Python interpreter executable, assuming that the Python library is found in "
"a fixed location relative to the Python interpreter executable. In "
"particular, it looks for a directory named :file:`lib/python{X.Y}` relative "
"to the parent directory where the executable named :file:`python` is found "
"on the shell command search path (the environment variable :envvar:`PATH`)."
msgstr ""
#: ../src/Doc/c-api/intro.rst:546
msgid ""
"For instance, if the Python executable is found in :file:`/usr/local/bin/"
"python`, it will assume that the libraries are in :file:`/usr/local/lib/"
"python{X.Y}`. (In fact, this particular path is also the \"fallback\" "
"location, used when no executable file named :file:`python` is found along :"
"envvar:`PATH`.) The user can override this behavior by setting the "
"environment variable :envvar:`PYTHONHOME`, or insert additional directories "
"in front of the standard path by setting :envvar:`PYTHONPATH`."
msgstr ""
# 6ff2dbf18a0e4545bda75bc276d81a78
#: ../src/Doc/c-api/intro.rst:561
msgid ""
"The embedding application can steer the search by calling "
"``Py_SetProgramName(file)`` *before* calling :c:func:`Py_Initialize`. Note "
"that :envvar:`PYTHONHOME` still overrides this and :envvar:`PYTHONPATH` is "
"still inserted in front of the standard path. An application that requires "
"total control has to provide its own implementation of :c:func:"
"`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, and :c:"
"func:`Py_GetProgramFullPath` (all defined in :file:`Modules/getpath.c`)."
msgstr ""
# a71717c958634237a91857399a2ad37c
#: ../src/Doc/c-api/intro.rst:571
msgid ""
"Sometimes, it is desirable to \"uninitialize\" Python. For instance, the "
"application may want to start over (make another call to :c:func:"
"`Py_Initialize`) or the application is simply done with its use of Python "
"and wants to free memory allocated by Python. This can be accomplished by "
"calling :c:func:`Py_Finalize`. The function :c:func:`Py_IsInitialized` "
"returns true if Python is currently in the initialized state. More "
"information about these functions is given in a later chapter. Notice that :"
"c:func:`Py_Finalize` does *not* free all memory allocated by the Python "
"interpreter, e.g. memory allocated by extension modules currently cannot be "
"released."
msgstr ""
#: ../src/Doc/c-api/intro.rst:585
msgid "Debugging Builds"
msgstr ""
#: ../src/Doc/c-api/intro.rst:587
msgid ""
"Python can be built with several macros to enable extra checks of the "
"interpreter and extension modules. These checks tend to add a large amount "
"of overhead to the runtime so they are not enabled by default."
msgstr ""
#: ../src/Doc/c-api/intro.rst:591
msgid ""
"A full list of the various types of debugging builds is in the file :file:"
"`Misc/SpecialBuilds.txt` in the Python source distribution. Builds are "
"available that support tracing of reference counts, debugging the memory "
"allocator, or low-level profiling of the main interpreter loop. Only the "
"most frequently-used builds will be described in the remainder of this "
"section."
msgstr ""
# f703908759754e558b8e009f998cb43a
#: ../src/Doc/c-api/intro.rst:597
msgid ""
"Compiling the interpreter with the :c:macro:`Py_DEBUG` macro defined "
"produces what is generally meant by \"a debug build\" of Python. :c:macro:"
"`Py_DEBUG` is enabled in the Unix build by adding ``--with-pydebug`` to the :"
"file:`./configure` command. It is also implied by the presence of the not-"
"Python-specific :c:macro:`_DEBUG` macro. When :c:macro:`Py_DEBUG` is "
"enabled in the Unix build, compiler optimization is disabled."
msgstr ""
#: ../src/Doc/c-api/intro.rst:604
msgid ""
"In addition to the reference count debugging described below, the following "
"extra checks are performed:"
msgstr ""
#: ../src/Doc/c-api/intro.rst:607
msgid "Extra checks are added to the object allocator."
msgstr ""
#: ../src/Doc/c-api/intro.rst:609
msgid "Extra checks are added to the parser and compiler."
msgstr ""
#: ../src/Doc/c-api/intro.rst:611
msgid ""
"Downcasts from wide types to narrow types are checked for loss of "
"information."
msgstr ""
#: ../src/Doc/c-api/intro.rst:613
msgid ""
"A number of assertions are added to the dictionary and set implementations. "
"In addition, the set object acquires a :meth:`test_c_api` method."
msgstr ""
#: ../src/Doc/c-api/intro.rst:616
msgid "Sanity checks of the input arguments are added to frame creation."
msgstr ""
# 4ecd3ed969454bff8b02e53447248ded
#: ../src/Doc/c-api/intro.rst:618
msgid ""
"The storage for long ints is initialized with a known invalid pattern to "
"catch reference to uninitialized digits."
msgstr ""
#: ../src/Doc/c-api/intro.rst:621
msgid ""
"Low-level tracing and extra exception checking are added to the runtime "
"virtual machine."
msgstr ""
#: ../src/Doc/c-api/intro.rst:624
msgid "Extra checks are added to the memory arena implementation."
msgstr ""
#: ../src/Doc/c-api/intro.rst:626
msgid "Extra debugging is added to the thread module."
msgstr ""
#: ../src/Doc/c-api/intro.rst:628
msgid "There may be additional checks not mentioned here."
msgstr ""
# 5aa02e25739d45d5ba6d0882fe4145c1
#: ../src/Doc/c-api/intro.rst:630
msgid ""
"Defining :c:macro:`Py_TRACE_REFS` enables reference tracing. When defined, "
"a circular doubly linked list of active objects is maintained by adding two "
"extra fields to every :c:type:`PyObject`. Total allocations are tracked as "
"well. Upon exit, all existing references are printed. (In interactive mode "
"this happens after every statement run by the interpreter.) Implied by :c:"
"macro:`Py_DEBUG`."
msgstr ""
#: ../src/Doc/c-api/intro.rst:636
msgid ""
"Please refer to :file:`Misc/SpecialBuilds.txt` in the Python source "
"distribution for more detailed information."
msgstr ""
#: ../src/Doc/c-api/iter.rst:6
msgid "Iterator Protocol"
msgstr ""
# 667bd7505afb4278ac173450b5819a7c
#: ../src/Doc/c-api/iter.rst:10
msgid "There are two functions specifically for working with iterators."
msgstr ""
# 210df15ee0ff49b495c118b77c082de6
#: ../src/Doc/c-api/iter.rst:15
msgid "Return true if the object *o* supports the iterator protocol."
msgstr ""
# 27a4835b46c54981aaf9cda004e7ce68
#: ../src/Doc/c-api/iter.rst:20
msgid ""
"Return the next value from the iteration *o*. The object must be an "
"iterator (it is up to the caller to check this). If there are no remaining "
"values, returns *NULL* with no exception set. If an error occurs while "
"retrieving the item, returns *NULL* and passes along the exception."
msgstr ""
#: ../src/Doc/c-api/iter.rst:25
msgid ""
"To write a loop which iterates over an iterator, the C code should look "
"something like this::"
msgstr ""
#: ../src/Doc/c-api/iterator.rst:6
msgid "Iterator Objects"
msgstr ""
#: ../src/Doc/c-api/iterator.rst:8
msgid ""
"Python provides two general-purpose iterator objects. The first, a sequence "
"iterator, works with an arbitrary sequence supporting the :meth:"
"`__getitem__` method. The second works with a callable object and a "
"sentinel value, calling the callable for each item in the sequence, and "
"ending the iteration when the sentinel value is returned."
msgstr ""
# 3eb373736e9e433f9f95ebb521887aaa
#: ../src/Doc/c-api/iterator.rst:17
msgid ""
"Type object for iterator objects returned by :c:func:`PySeqIter_New` and the "
"one-argument form of the :func:`iter` built-in function for built-in "
"sequence types."
msgstr ""
# 717e00b9a5ad459086cf1d5955b8d0a2
#: ../src/Doc/c-api/iterator.rst:26
msgid "Return true if the type of *op* is :c:data:`PySeqIter_Type`."
msgstr ""
# df4018231d214f26abea5f875c47ac4d
#: ../src/Doc/c-api/iterator.rst:33
msgid ""
"Return an iterator that works with a general sequence object, *seq*. The "
"iteration ends when the sequence raises :exc:`IndexError` for the "
"subscripting operation."
msgstr ""
# 9b554855e05b4dc1ae3faf963f255ae6
#: ../src/Doc/c-api/iterator.rst:42
msgid ""
"Type object for iterator objects returned by :c:func:`PyCallIter_New` and "
"the two-argument form of the :func:`iter` built-in function."
msgstr ""
# b077a418908b48ee88f704d198c617af
#: ../src/Doc/c-api/iterator.rst:50
msgid "Return true if the type of *op* is :c:data:`PyCallIter_Type`."
msgstr ""
# c800254e59e541878844cbbd4532747b
#: ../src/Doc/c-api/iterator.rst:57
msgid ""
"Return a new iterator. The first parameter, *callable*, can be any Python "
"callable object that can be called with no parameters; each call to it "
"should return the next item in the iteration. When *callable* returns a "
"value equal to *sentinel*, the iteration will be terminated."
msgstr ""
#: ../src/Doc/c-api/list.rst:6
msgid "List Objects"
msgstr ""
# 87ab89832ea748e29b4ccf59886e70d9
#: ../src/Doc/c-api/list.rst:13
msgid "This subtype of :c:type:`PyObject` represents a Python list object."
msgstr ""
# 69b79e85e5c04301bbefa1f64f571273
#: ../src/Doc/c-api/list.rst:18
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python list type. "
"This is the same object as ``list`` in the Python layer."
msgstr ""
# 5370cb112617448bbdda10df233681fa
#: ../src/Doc/c-api/list.rst:24
msgid ""
"Return true if *p* is a list object or an instance of a subtype of the list "
"type."
msgstr ""
# 0683bbbe31bc42dc8dff627e4b6df74c
#: ../src/Doc/c-api/list.rst:33
msgid ""
"Return true if *p* is a list object, but not an instance of a subtype of the "
"list type."
msgstr ""
# 6fdd70061fdc40629c1dc79147c93c42
#: ../src/Doc/c-api/list.rst:41
msgid "Return a new list of length *len* on success, or *NULL* on failure."
msgstr ""
# d527e2a32bd34270b6893cb7b7823ed0
#: ../src/Doc/c-api/list.rst:45
msgid ""
"If *len* is greater than zero, the returned list object's items are set to "
"``NULL``. Thus you cannot use abstract API functions such as :c:func:"
"`PySequence_SetItem` or expose the object to Python code before setting all "
"items to a real object with :c:func:`PyList_SetItem`."
msgstr ""
# 0f10a685c298435397ed20f079bf3275
#: ../src/Doc/c-api/list.rst:59
msgid ""
"Return the length of the list object in *list*; this is equivalent to "
"``len(list)`` on a list object."
msgstr ""
# e4220c15cb2f436fbf6dc4eecb8bd401
#: ../src/Doc/c-api/list.rst:69
msgid "Macro form of :c:func:`PyList_Size` without error checking."
msgstr ""
# 77415a364cd044278bd2d50421924b28
#: ../src/Doc/c-api/list.rst:78
msgid ""
"Return the object at position *index* in the list pointed to by *list*. The "
"position must be positive, indexing from the end of the list is not "
"supported. If *index* is out of bounds, return *NULL* and set an :exc:"
"`IndexError` exception."
msgstr ""
# bb6f42cfbf9f4b388a6f44a2a241bcbf
#: ../src/Doc/c-api/list.rst:90
msgid "Macro form of :c:func:`PyList_GetItem` without error checking."
msgstr ""
# 0cea0c4fa41046e5823cad96f117fa3e
#: ../src/Doc/c-api/list.rst:99
msgid ""
"Set the item at index *index* in list to *item*. Return ``0`` on success or "
"``-1`` on failure."
msgstr ""
# a911387e91ac474f9418c8c7a3422be3
#: ../src/Doc/c-api/list.rst:104
msgid ""
"This function \"steals\" a reference to *item* and discards a reference to "
"an item already in the list at the affected position."
msgstr ""
# e3a4738763a94c4791b3b0997c9cec2f
#: ../src/Doc/c-api/list.rst:114
msgid ""
"Macro form of :c:func:`PyList_SetItem` without error checking. This is "
"normally only used to fill in new lists where there is no previous content."
msgstr ""
# 356992a393a54bf9a901c7babc38d151
#: ../src/Doc/c-api/list.rst:119
msgid ""
"This macro \"steals\" a reference to *item*, and, unlike :c:func:"
"`PyList_SetItem`, does *not* discard a reference to any item that it being "
"replaced; any reference in *list* at position *i* will be leaked."
msgstr ""
# e1653b8812f244229f5de8bdb7c1cd99
#: ../src/Doc/c-api/list.rst:131
msgid ""
"Insert the item *item* into list *list* in front of index *index*. Return "
"``0`` if successful; return ``-1`` and set an exception if unsuccessful. "
"Analogous to ``list.insert(index, item)``."
msgstr ""
# bc2c8331d180471db577c4879538d38d
#: ../src/Doc/c-api/list.rst:142
msgid ""
"Append the object *item* at the end of list *list*. Return ``0`` if "
"successful; return ``-1`` and set an exception if unsuccessful. Analogous "
"to ``list.append(item)``."
msgstr ""
# eec44869c2074de09174e16679f51012
#: ../src/Doc/c-api/list.rst:149
msgid ""
"Return a list of the objects in *list* containing the objects *between* "
"*low* and *high*. Return *NULL* and set an exception if unsuccessful. "
"Analogous to ``list[low:high]``. Negative indices, as when slicing from "
"Python, are not supported."
msgstr ""
# f48889da097b479593bbd542edd1380a
#: ../src/Doc/c-api/list.rst:161
msgid ""
"Set the slice of *list* between *low* and *high* to the contents of "
"*itemlist*. Analogous to ``list[low:high] = itemlist``. The *itemlist* may "
"be *NULL*, indicating the assignment of an empty list (slice deletion). "
"Return ``0`` on success, ``-1`` on failure. Negative indices, as when "
"slicing from Python, are not supported."
msgstr ""
# 1ad237a04dfa414ba80a23a45a323b2f
#: ../src/Doc/c-api/list.rst:174
msgid ""
"Sort the items of *list* in place. Return ``0`` on success, ``-1`` on "
"failure. This is equivalent to ``list.sort()``."
msgstr ""
# 4630a42fe7404ba987ed6eedb995f9e4
#: ../src/Doc/c-api/list.rst:180
msgid ""
"Reverse the items of *list* in place. Return ``0`` on success, ``-1`` on "
"failure. This is the equivalent of ``list.reverse()``."
msgstr ""
# f224c856bcfd4668a3665fd57cf5e932
#: ../src/Doc/c-api/list.rst:188
msgid ""
"Return a new tuple object containing the contents of *list*; equivalent to "
"``tuple(list)``."
msgstr ""
#: ../src/Doc/c-api/long.rst:6
#, fuzzy
msgid "Long Integer Objects"
msgstr "Autres Objets"
# 6feedc0fa1de4fc9a050505bea357e6d
#: ../src/Doc/c-api/long.rst:13
msgid ""
"This subtype of :c:type:`PyObject` represents a Python long integer object."
msgstr ""
# eef383e71a704c1e8c1170ff010d8884
#: ../src/Doc/c-api/long.rst:20
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python long integer "
"type. This is the same object as ``long`` and ``types.LongType``."
msgstr ""
# ac39de376fdf4154917febbdc959da14
#: ../src/Doc/c-api/long.rst:26
msgid ""
"Return true if its argument is a :c:type:`PyLongObject` or a subtype of :c:"
"type:`PyLongObject`."
msgstr ""
# 636671c0724a42178da25696eaa1d0d7
#: ../src/Doc/c-api/long.rst:35
msgid ""
"Return true if its argument is a :c:type:`PyLongObject`, but not a subtype "
"of :c:type:`PyLongObject`."
msgstr ""
# a66d768a9a4d437eb2ef1081fdcbb2fc
#: ../src/Doc/c-api/long.rst:43
msgid ""
"Return a new :c:type:`PyLongObject` object from *v*, or *NULL* on failure."
msgstr ""
# dba82f43a4f94ff89bbe1f3d7d86746b
#: ../src/Doc/c-api/long.rst:48
msgid ""
"Return a new :c:type:`PyLongObject` object from a C :c:type:`unsigned long`, "
"or *NULL* on failure."
msgstr ""
# e1d447c930f84e418d4019692b69d5ed
#: ../src/Doc/c-api/long.rst:54
msgid ""
"Return a new :c:type:`PyLongObject` object from a C :c:type:`Py_ssize_t`, or "
"*NULL* on failure."
msgstr ""
# 6ba5e2e02825435383bc19c429140877
#: ../src/Doc/c-api/long.rst:62
msgid ""
"Return a new :c:type:`PyLongObject` object from a C :c:type:`size_t`, or "
"*NULL* on failure."
msgstr ""
# bb589fa886f5478f8fff9ed170148b5a
#: ../src/Doc/c-api/long.rst:70
msgid ""
"Return a new :c:type:`PyLongObject` object from a C :c:type:`long long`, or "
"*NULL* on failure."
msgstr ""
# 98f177674b234a9992c6a218a7826c9f
#: ../src/Doc/c-api/long.rst:76
msgid ""
"Return a new :c:type:`PyLongObject` object from a C :c:type:`unsigned long "
"long`, or *NULL* on failure."
msgstr ""
# b51d2ac612724361818d685c6b666d45
#: ../src/Doc/c-api/long.rst:82
msgid ""
"Return a new :c:type:`PyLongObject` object from the integer part of *v*, or "
"*NULL* on failure."
msgstr ""
# 0dafe331119341ff9891dca394527a85
#: ../src/Doc/c-api/long.rst:88
msgid ""
"Return a new :c:type:`PyLongObject` based on the string value in *str*, "
"which is interpreted according to the radix in *base*. If *pend* is non-"
"*NULL*, *\\*pend* will point to the first character in *str* which follows "
"the representation of the number. If *base* is ``0``, the radix will be "
"determined based on the leading characters of *str*: if *str* starts with "
"``'0x'`` or ``'0X'``, radix 16 will be used; if *str* starts with ``'0'``, "
"radix 8 will be used; otherwise radix 10 will be used. If *base* is not "
"``0``, it must be between ``2`` and ``36``, inclusive. Leading spaces are "
"ignored. If there are no digits, :exc:`ValueError` will be raised."
msgstr ""
# ad9e2203296e4079bf78cf9aa4ed2dae
#: ../src/Doc/c-api/long.rst:101
msgid ""
"Convert a sequence of Unicode digits to a Python long integer value. The "
"first parameter, *u*, points to the first character of the Unicode string, "
"*length* gives the number of characters, and *base* is the radix for the "
"conversion. The radix must be in the range [2, 36]; if it is out of range, :"
"exc:`ValueError` will be raised."
msgstr ""
# 0d7298e3043d4723b5a449b9e7c8b120
#: ../src/Doc/c-api/long.rst:116
msgid ""
"Create a Python integer or long integer from the pointer *p*. The pointer "
"value can be retrieved from the resulting value using :c:func:"
"`PyLong_AsVoidPtr`."
msgstr ""
# af34f3f689234422a526d3b46dd6c323
#: ../src/Doc/c-api/long.rst:131
msgid ""
"Return a C :c:type:`long` representation of the contents of *pylong*. If "
"*pylong* is greater than :const:`LONG_MAX`, an :exc:`OverflowError` is "
"raised and ``-1`` will be returned."
msgstr ""
# adb5330a6dd34ff0bf1a93c2cb6283a8
#: ../src/Doc/c-api/long.rst:138
msgid ""
"Return a C :c:type:`long` representation of the contents of *pylong*. If "
"*pylong* is greater than :const:`LONG_MAX` or less than :const:`LONG_MIN`, "
"set *\\*overflow* to ``1`` or ``-1``, respectively, and return ``-1``; "
"otherwise, set *\\*overflow* to ``0``. If any other exception occurs (for "
"example a TypeError or MemoryError), then ``-1`` will be returned and *"
"\\*overflow* will be ``0``."
msgstr ""
# 8cef90a92bf940cbb689aab81439ab38
#: ../src/Doc/c-api/long.rst:151
msgid ""
"Return a C :c:type:`long long` representation of the contents of *pylong*. "
"If *pylong* is greater than :const:`PY_LLONG_MAX` or less than :const:"
"`PY_LLONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and "
"return ``-1``; otherwise, set *\\*overflow* to ``0``. If any other "
"exception occurs (for example a TypeError or MemoryError), then ``-1`` will "
"be returned and *\\*overflow* will be ``0``."
msgstr ""
# 4a7ae713f5ce48179432175d536c7cfe
#: ../src/Doc/c-api/long.rst:168
msgid ""
"Return a C :c:type:`Py_ssize_t` representation of the contents of *pylong*. "
"If *pylong* is greater than :const:`PY_SSIZE_T_MAX`, an :exc:`OverflowError` "
"is raised and ``-1`` will be returned."
msgstr ""
# a3844fe9ee284618834a2feca60e9b5e
#: ../src/Doc/c-api/long.rst:181
msgid ""
"Return a C :c:type:`unsigned long` representation of the contents of "
"*pylong*. If *pylong* is greater than :const:`ULONG_MAX`, an :exc:"
"`OverflowError` is raised."
msgstr ""
# 585460f9052f43658c46275c47f750a4
#: ../src/Doc/c-api/long.rst:191
msgid ""
"Return a C :c:type:`long long` from a Python long integer. If *pylong* "
"cannot be represented as a :c:type:`long long`, an :exc:`OverflowError` is "
"raised and ``-1`` is returned."
msgstr ""
# f245c23a0ce54bfc9079dabe23228d93
#: ../src/Doc/c-api/long.rst:203
msgid ""
"Return a C :c:type:`unsigned long long` from a Python long integer. If "
"*pylong* cannot be represented as an :c:type:`unsigned long long`, an :exc:"
"`OverflowError` is raised and ``(unsigned long long)-1`` is returned."
msgstr ""
# af0283245e2f4248b76d3f670656334e
#: ../src/Doc/c-api/long.rst:217
msgid ""
"Return a C :c:type:`unsigned long` from a Python long integer, without "
"checking for overflow."
msgstr ""
# da0bae17eac840d28eca0418294fb013
#: ../src/Doc/c-api/long.rst:225
msgid ""
"Return a C :c:type:`unsigned long long` from a Python long integer, without "
"checking for overflow."
msgstr ""
# e5516ae3d0b1415594878cb43fbdbda3
#: ../src/Doc/c-api/long.rst:233
msgid ""
"Return a C :c:type:`double` representation of the contents of *pylong*. If "
"*pylong* cannot be approximately represented as a :c:type:`double`, an :exc:"
"`OverflowError` exception is raised and ``-1.0`` will be returned."
msgstr ""
# 31566cacbc304c17b2223d0cf8245b9d
#: ../src/Doc/c-api/long.rst:240
msgid ""
"Convert a Python integer or long integer *pylong* to a C :c:type:`void` "
"pointer. If *pylong* cannot be converted, an :exc:`OverflowError` will be "
"raised. This is only assured to produce a usable :c:type:`void` pointer for "
"values created with :c:func:`PyLong_FromVoidPtr`."
msgstr ""
#: ../src/Doc/c-api/mapping.rst:6
msgid "Mapping Protocol"
msgstr ""
# b72696976b504a54ae2a246c383e2192
#: ../src/Doc/c-api/mapping.rst:11
msgid ""
"Return ``1`` if the object provides mapping protocol, and ``0`` otherwise. "
"This function always succeeds."
msgstr ""
# 6888276fef474b139aede41ca9ce0138
#: ../src/Doc/c-api/mapping.rst:20
msgid ""
"Returns the number of keys in object *o* on success, and ``-1`` on failure. "
"For objects that do not provide mapping protocol, this is equivalent to the "
"Python expression ``len(o)``."
msgstr ""
# 3518a3972bfa44feb561e0d6724a6eaa
# 2ac05a7af15140abae1761b3f69c0af7
#: ../src/Doc/c-api/mapping.rst:31 ../src/Doc/c-api/mapping.rst:37
msgid ""
"Remove the mapping for object *key* from the object *o*. Return ``-1`` on "
"failure. This is equivalent to the Python statement ``del o[key]``."
msgstr ""
# 42c3dcff05fc450484e6532a1df6ebb6
#: ../src/Doc/c-api/mapping.rst:43
msgid ""
"On success, return ``1`` if the mapping object has the key *key* and ``0`` "
"otherwise. This is equivalent to ``o[key]``, returning ``True`` on success "
"and ``False`` on an exception. This function always succeeds."
msgstr ""
# c8923b8b0a3b470db3c950d554b4b661
#: ../src/Doc/c-api/mapping.rst:50
msgid ""
"Return ``1`` if the mapping object has the key *key* and ``0`` otherwise. "
"This is equivalent to ``o[key]``, returning ``True`` on success and "
"``False`` on an exception. This function always succeeds."
msgstr ""
# 140cd35f585447869e345ec27eb51f94
#: ../src/Doc/c-api/mapping.rst:57
msgid ""
"On success, return a list of the keys in object *o*. On failure, return "
"*NULL*. This is equivalent to the Python expression ``o.keys()``."
msgstr ""
# 43f8a010f2a5434ba45e9bf0141f8c0d
#: ../src/Doc/c-api/mapping.rst:63
msgid ""
"On success, return a list of the values in object *o*. On failure, return "
"*NULL*. This is equivalent to the Python expression ``o.values()``."
msgstr ""
# ea5e4bd57fc84212bf5c1602a443aa81
#: ../src/Doc/c-api/mapping.rst:69
msgid ""
"On success, return a list of the items in object *o*, where each item is a "
"tuple containing a key-value pair. On failure, return *NULL*. This is "
"equivalent to the Python expression ``o.items()``."
msgstr ""
# df5b263214a34c828e61ed3f852c8741
# 1b0219bdd7044d10b5950e1657041554
#: ../src/Doc/c-api/mapping.rst:76 ../src/Doc/c-api/object.rst:364
msgid ""
"Return element of *o* corresponding to the object *key* or *NULL* on "
"failure. This is the equivalent of the Python expression ``o[key]``."
msgstr ""
# 4fe1615dc3344b0f93d36e30d182d3fc
#: ../src/Doc/c-api/mapping.rst:82
msgid ""
"Map the object *key* to the value *v* in object *o*. Returns ``-1`` on "
"failure. This is the equivalent of the Python statement ``o[key] = v``."
msgstr ""
#: ../src/Doc/c-api/marshal.rst:6
msgid "Data marshalling support"
msgstr ""
#: ../src/Doc/c-api/marshal.rst:8
msgid ""
"These routines allow C code to work with serialized objects using the same "
"data format as the :mod:`marshal` module. There are functions to write data "
"into the serialization format, and additional functions that can be used to "
"read the data back. Files used to store marshalled data must be opened in "
"binary mode."
msgstr ""
#: ../src/Doc/c-api/marshal.rst:14
msgid "Numeric values are stored with the least significant byte first."
msgstr ""
# c13f0fa17af443d085501f80bd70824f
#: ../src/Doc/c-api/marshal.rst:16
msgid ""
"The module supports two versions of the data format: version 0 is the "
"historical version, version 1 (new in Python 2.4) shares interned strings in "
"the file, and upon unmarshalling. Version 2 (new in Python 2.5) uses a "
"binary format for floating point numbers. *Py_MARSHAL_VERSION* indicates "
"the current file format (currently 2)."
msgstr ""
# d730a12b867641d6a0d2913370b912b1
#: ../src/Doc/c-api/marshal.rst:25
msgid ""
"Marshal a :c:type:`long` integer, *value*, to *file*. This will only write "
"the least-significant 32 bits of *value*; regardless of the size of the "
"native :c:type:`long` type."
msgstr ""
# 3e414b1b16b74dae932b306dc896c253
#: ../src/Doc/c-api/marshal.rst:35
msgid "Marshal a Python object, *value*, to *file*."
msgstr ""
# 7ef39640e6e0431a817ed3535348d91e
#: ../src/Doc/c-api/marshal.rst:43
msgid ""
"Return a string object containing the marshalled representation of *value*."
msgstr ""
#: ../src/Doc/c-api/marshal.rst:49
msgid "The following functions allow marshalled values to be read back in."
msgstr ""
#: ../src/Doc/c-api/marshal.rst:51
msgid ""
"XXX What about error detection? It appears that reading past the end of the "
"file will always result in a negative numeric value (where that's relevant), "
"but it's not clear that negative values won't be handled properly when "
"there's no error. What's the right way to tell? Should only non-negative "
"values be written using these routines?"
msgstr ""
# e459b0735b424b259d0b91329188ef6c
#: ../src/Doc/c-api/marshal.rst:60
msgid ""
"Return a C :c:type:`long` from the data stream in a :c:type:`FILE\\*` opened "
"for reading. Only a 32-bit value can be read in using this function, "
"regardless of the native size of :c:type:`long`."
msgstr ""
# 7d79e685bb214a9a92cbc33337d7c13b
#: ../src/Doc/c-api/marshal.rst:67
msgid ""
"Return a C :c:type:`short` from the data stream in a :c:type:`FILE\\*` "
"opened for reading. Only a 16-bit value can be read in using this function, "
"regardless of the native size of :c:type:`short`."
msgstr ""
# 200bcabe55d54f8195f4081547acd1b9
#: ../src/Doc/c-api/marshal.rst:74
msgid ""
"Return a Python object from the data stream in a :c:type:`FILE\\*` opened "
"for reading. On error, sets the appropriate exception (:exc:`EOFError` or :"
"exc:`TypeError`) and returns *NULL*."
msgstr ""
# 28d22af61bdb41c4be4d0334ff751c31
#: ../src/Doc/c-api/marshal.rst:81
msgid ""
"Return a Python object from the data stream in a :c:type:`FILE\\*` opened "
"for reading. Unlike :c:func:`PyMarshal_ReadObjectFromFile`, this function "
"assumes that no further objects will be read from the file, allowing it to "
"aggressively load file data into memory so that the de-serialization can "
"operate from data in memory rather than reading a byte at a time from the "
"file. Only use these variant if you are certain that you won't be reading "
"anything else from the file. On error, sets the appropriate exception (:exc:"
"`EOFError` or :exc:`TypeError`) and returns *NULL*."
msgstr ""
# b9b2923a5009424db0c8b877d613699f
#: ../src/Doc/c-api/marshal.rst:93
msgid ""
"Return a Python object from the data stream in a character buffer containing "
"*len* bytes pointed to by *string*. On error, sets the appropriate "
"exception (:exc:`EOFError` or :exc:`TypeError`) and returns *NULL*."
msgstr ""
#: ../src/Doc/c-api/memory.rst:8
msgid "Memory Management"
msgstr ""
#: ../src/Doc/c-api/memory.rst:17
msgid "Overview"
msgstr ""
#: ../src/Doc/c-api/memory.rst:19
msgid ""
"Memory management in Python involves a private heap containing all Python "
"objects and data structures. The management of this private heap is ensured "
"internally by the *Python memory manager*. The Python memory manager has "
"different components which deal with various dynamic storage management "
"aspects, like sharing, segmentation, preallocation or caching."
msgstr ""
#: ../src/Doc/c-api/memory.rst:25
msgid ""
"At the lowest level, a raw memory allocator ensures that there is enough "
"room in the private heap for storing all Python-related data by interacting "
"with the memory manager of the operating system. On top of the raw memory "
"allocator, several object-specific allocators operate on the same heap and "
"implement distinct memory management policies adapted to the peculiarities "
"of every object type. For example, integer objects are managed differently "
"within the heap than strings, tuples or dictionaries because integers imply "
"different storage requirements and speed/space tradeoffs. The Python memory "
"manager thus delegates some of the work to the object-specific allocators, "
"but ensures that the latter operate within the bounds of the private heap."
msgstr ""
#: ../src/Doc/c-api/memory.rst:36
msgid ""
"It is important to understand that the management of the Python heap is "
"performed by the interpreter itself and that the user has no control over "
"it, even if she regularly manipulates object pointers to memory blocks "
"inside that heap. The allocation of heap space for Python objects and other "
"internal buffers is performed on demand by the Python memory manager through "
"the Python/C API functions listed in this document."
msgstr ""
# 548d2ab0d8274e2ead5ff5960d783d41
#: ../src/Doc/c-api/memory.rst:49
msgid ""
"To avoid memory corruption, extension writers should never try to operate on "
"Python objects with the functions exported by the C library: :c:func:"
"`malloc`, :c:func:`calloc`, :c:func:`realloc` and :c:func:`free`. This will "
"result in mixed calls between the C allocator and the Python memory manager "
"with fatal consequences, because they implement different algorithms and "
"operate on different heaps. However, one may safely allocate and release "
"memory blocks with the C library allocator for individual purposes, as shown "
"in the following example::"
msgstr ""
#: ../src/Doc/c-api/memory.rst:68
msgid ""
"In this example, the memory request for the I/O buffer is handled by the C "
"library allocator. The Python memory manager is involved only in the "
"allocation of the string object returned as a result."
msgstr ""
#: ../src/Doc/c-api/memory.rst:72
msgid ""
"In most situations, however, it is recommended to allocate memory from the "
"Python heap specifically because the latter is under control of the Python "
"memory manager. For example, this is required when the interpreter is "
"extended with new object types written in C. Another reason for using the "
"Python heap is the desire to *inform* the Python memory manager about the "
"memory needs of the extension module. Even when the requested memory is used "
"exclusively for internal, highly-specific purposes, delegating all memory "
"requests to the Python memory manager causes the interpreter to have a more "
"accurate image of its memory footprint as a whole. Consequently, under "
"certain circumstances, the Python memory manager may or may not trigger "
"appropriate actions, like garbage collection, memory compaction or other "
"preventive procedures. Note that by using the C library allocator as shown "
"in the previous example, the allocated memory for the I/O buffer escapes "
"completely the Python memory manager."
msgstr ""
#: ../src/Doc/c-api/memory.rst:90
msgid "Memory Interface"
msgstr ""
#: ../src/Doc/c-api/memory.rst:92
msgid ""
"The following function sets, modeled after the ANSI C standard, but "
"specifying behavior when requesting zero bytes, are available for allocating "
"and releasing memory from the Python heap:"
msgstr ""
# 97bad29b7a714848913946c03ddd06b7
#: ../src/Doc/c-api/memory.rst:99
msgid ""
"Allocates *n* bytes and returns a pointer of type :c:type:`void\\*` to the "
"allocated memory, or *NULL* if the request fails. Requesting zero bytes "
"returns a distinct non-*NULL* pointer if possible, as if ``PyMem_Malloc(1)`` "
"had been called instead. The memory will not have been initialized in any "
"way."
msgstr ""
# 5fdace27c5be454b96fb0754260da595
#: ../src/Doc/c-api/memory.rst:107
msgid ""
"Resizes the memory block pointed to by *p* to *n* bytes. The contents will "
"be unchanged to the minimum of the old and the new sizes. If *p* is *NULL*, "
"the call is equivalent to ``PyMem_Malloc(n)``; else if *n* is equal to zero, "
"the memory block is resized but is not freed, and the returned pointer is "
"non-*NULL*. Unless *p* is *NULL*, it must have been returned by a previous "
"call to :c:func:`PyMem_Malloc` or :c:func:`PyMem_Realloc`. If the request "
"fails, :c:func:`PyMem_Realloc` returns *NULL* and *p* remains a valid "
"pointer to the previous memory area."
msgstr ""
# 2e11e74b2fb94f3383c59a60efe8bdd9
#: ../src/Doc/c-api/memory.rst:119
msgid ""
"Frees the memory block pointed to by *p*, which must have been returned by a "
"previous call to :c:func:`PyMem_Malloc` or :c:func:`PyMem_Realloc`. "
"Otherwise, or if ``PyMem_Free(p)`` has been called before, undefined "
"behavior occurs. If *p* is *NULL*, no operation is performed."
msgstr ""
#: ../src/Doc/c-api/memory.rst:124
msgid ""
"The following type-oriented macros are provided for convenience. Note that "
"*TYPE* refers to any C type."
msgstr ""
# 9f10048ad9b443d48637735acf9536ce
#: ../src/Doc/c-api/memory.rst:130
msgid ""
"Same as :c:func:`PyMem_Malloc`, but allocates ``(n * sizeof(TYPE))`` bytes "
"of memory. Returns a pointer cast to :c:type:`TYPE\\*`. The memory will "
"not have been initialized in any way."
msgstr ""
# 3707de11ae0a4f2e8c33379a9d04c34a
#: ../src/Doc/c-api/memory.rst:137
msgid ""
"Same as :c:func:`PyMem_Realloc`, but the memory block is resized to ``(n * "
"sizeof(TYPE))`` bytes. Returns a pointer cast to :c:type:`TYPE\\*`. On "
"return, *p* will be a pointer to the new memory area, or *NULL* in the event "
"of failure. This is a C preprocessor macro; p is always reassigned. Save "
"the original value of p to avoid losing memory when handling errors."
msgstr ""
# 0f7be95b2ad94db49365ea22adfa3b68
#: ../src/Doc/c-api/memory.rst:146
msgid "Same as :c:func:`PyMem_Free`."
msgstr ""
#: ../src/Doc/c-api/memory.rst:148
msgid ""
"In addition, the following macro sets are provided for calling the Python "
"memory allocator directly, without involving the C API functions listed "
"above. However, note that their use does not preserve binary compatibility "
"across Python versions and is therefore deprecated in extension modules."
msgstr ""
# b00fd5b73af14b7cb055dc985f1d7ce8
#: ../src/Doc/c-api/memory.rst:153
msgid ":c:func:`PyMem_MALLOC`, :c:func:`PyMem_REALLOC`, :c:func:`PyMem_FREE`."
msgstr ""
# 50df6e371c9a40d38abb89674c3b41b8
#: ../src/Doc/c-api/memory.rst:155
msgid ":c:func:`PyMem_NEW`, :c:func:`PyMem_RESIZE`, :c:func:`PyMem_DEL`."
msgstr ""
#: ../src/Doc/c-api/memory.rst:161
msgid "Examples"
msgstr ""
#: ../src/Doc/c-api/memory.rst:163
msgid ""
"Here is the example from section :ref:`memoryoverview`, rewritten so that "
"the I/O buffer is allocated from the Python heap by using the first function "
"set::"
msgstr ""
#: ../src/Doc/c-api/memory.rst:176
msgid "The same code using the type-oriented function set::"
msgstr ""
#: ../src/Doc/c-api/memory.rst:188
msgid ""
"Note that in the two examples above, the buffer is always manipulated via "
"functions belonging to the same set. Indeed, it is required to use the same "
"memory API family for a given memory block, so that the risk of mixing "
"different allocators is reduced to a minimum. The following code sequence "
"contains two errors, one of which is labeled as *fatal* because it mixes two "
"different allocators operating on different heaps. ::"
msgstr ""
# 867858c725a64316ad90b887d69b244b
#: ../src/Doc/c-api/memory.rst:203
msgid ""
"In addition to the functions aimed at handling raw memory blocks from the "
"Python heap, objects in Python are allocated and released with :c:func:"
"`PyObject_New`, :c:func:`PyObject_NewVar` and :c:func:`PyObject_Del`."
msgstr ""
#: ../src/Doc/c-api/memory.rst:207
msgid ""
"These will be explained in the next chapter on defining and implementing new "
"object types in C."
msgstr ""
#: ../src/Doc/c-api/method.rst:6
msgid "Method Objects"
msgstr "Les objets méthode"
# 508ea530b60141c0bc07324d03466b38
#: ../src/Doc/c-api/method.rst:10
msgid ""
"There are some useful functions that are useful for working with method "
"objects."
msgstr ""
# 37863ef06f5440599137c9df9f8ad268
#: ../src/Doc/c-api/method.rst:17
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python method type. "
"This is exposed to Python programs as ``types.MethodType``."
msgstr ""
# d79c7aaf06dd4b3bb08ca6e879a9dcdb
#: ../src/Doc/c-api/method.rst:23
msgid ""
"Return true if *o* is a method object (has type :c:data:`PyMethod_Type`). "
"The parameter must not be *NULL*."
msgstr ""
# 59adbc6adc4148d18577e3a9db32188c
#: ../src/Doc/c-api/method.rst:29
msgid ""
"Return a new method object, with *func* being any callable object; this is "
"the function that will be called when the method is called. If this method "
"should be bound to an instance, *self* should be the instance and *class* "
"should be the class of *self*, otherwise *self* should be *NULL* and *class* "
"should be the class which provides the unbound method.."
msgstr ""
# 5237e828d04d411d88db837c76b183dc
#: ../src/Doc/c-api/method.rst:38
msgid ""
"Return the class object from which the method *meth* was created; if this "
"was created from an instance, it will be the class of the instance."
msgstr ""
# 4c75327632f44f248582050eb2015a0c
#: ../src/Doc/c-api/method.rst:44
msgid "Macro version of :c:func:`PyMethod_Class` which avoids error checking."
msgstr ""
# 8dd6c69d0bf1443ab357df8227de26e1
#: ../src/Doc/c-api/method.rst:49
msgid "Return the function object associated with the method *meth*."
msgstr ""
# 2b66c63e952d4355b12dab82db0e9fc1
#: ../src/Doc/c-api/method.rst:54
msgid ""
"Macro version of :c:func:`PyMethod_Function` which avoids error checking."
msgstr ""
# 8479f9480bf046848f2c3e183e7754f8
#: ../src/Doc/c-api/method.rst:59
msgid ""
"Return the instance associated with the method *meth* if it is bound, "
"otherwise return *NULL*."
msgstr ""
# cc3dca38c86344aaa78d08c47d36fe92
#: ../src/Doc/c-api/method.rst:65
msgid "Macro version of :c:func:`PyMethod_Self` which avoids error checking."
msgstr ""
# a6a72574d6074a6bbf55dadc77e26234
# 8dab4913d1554f07a41cbcfc011d33f7
# ae1920082d5a414ab120183edc3100df
#: ../src/Doc/c-api/method.rst:70 ../src/Doc/c-api/tuple.rst:162
#: ../src/Doc/c-api/unicode.rst:104
msgid "Clear the free list. Return the total number of freed items."
msgstr ""
#: ../src/Doc/c-api/module.rst:6
msgid "Module Objects"
msgstr ""
#: ../src/Doc/c-api/module.rst:10
msgid "There are only a few functions special to module objects."
msgstr ""
# 909b62d3074249e690a45db0123b7300
#: ../src/Doc/c-api/module.rst:17
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python module type. "
"This is exposed to Python programs as ``types.ModuleType``."
msgstr ""
# 8b725b91dc6540649161e55562c98fd0
#: ../src/Doc/c-api/module.rst:23
msgid "Return true if *p* is a module object, or a subtype of a module object."
msgstr ""
# 7b71be9ae5d1407783c18f9f8a366ae8
#: ../src/Doc/c-api/module.rst:31
msgid ""
"Return true if *p* is a module object, but not a subtype of :c:data:"
"`PyModule_Type`."
msgstr ""
# ac56275b7a0e4de38e9386d7cb090bca
#: ../src/Doc/c-api/module.rst:44
msgid ""
"Return a new module object with the :attr:`__name__` attribute set to "
"*name*. Only the module's :attr:`__doc__` and :attr:`__name__` attributes "
"are filled in; the caller is responsible for providing a :attr:`__file__` "
"attribute."
msgstr ""
# 1fb0546c796d4d5baa2f726fec3f66bb
#: ../src/Doc/c-api/module.rst:53
msgid ""
"Return the dictionary object that implements *module*'s namespace; this "
"object is the same as the :attr:`__dict__` attribute of the module object. "
"This function never fails. It is recommended extensions use other :c:func:"
"`PyModule_\\*` and :c:func:`PyObject_\\*` functions rather than directly "
"manipulate a module's :attr:`__dict__`."
msgstr ""
# a35ebc6cb5a34f33a944a319383ea7ee
#: ../src/Doc/c-api/module.rst:66
msgid ""
"Return *module*'s :attr:`__name__` value. If the module does not provide "
"one, or if it is not a string, :exc:`SystemError` is raised and *NULL* is "
"returned."
msgstr ""
# 7f626985ad634cde8bcc346946339bb6
#: ../src/Doc/c-api/module.rst:76
msgid ""
"Return the name of the file from which *module* was loaded using *module*'s :"
"attr:`__file__` attribute. If this is not defined, or if it is not a "
"string, raise :exc:`SystemError` and return *NULL*."
msgstr ""
# b54060dc6edf44c08063b31fc5ae1931
#: ../src/Doc/c-api/module.rst:83
msgid ""
"Add an object to *module* as *name*. This is a convenience function which "
"can be used from the module's initialization function. This steals a "
"reference to *value*. Return ``-1`` on error, ``0`` on success."
msgstr ""
# 79baca532372407082b6bcadbce67f17
#: ../src/Doc/c-api/module.rst:92
msgid ""
"Add an integer constant to *module* as *name*. This convenience function "
"can be used from the module's initialization function. Return ``-1`` on "
"error, ``0`` on success."
msgstr ""
# 74088641283c46ea9d23dfcaa9166801
#: ../src/Doc/c-api/module.rst:101
msgid ""
"Add a string constant to *module* as *name*. This convenience function can "
"be used from the module's initialization function. The string *value* must "
"be null-terminated. Return ``-1`` on error, ``0`` on success."
msgstr ""
# bc043dfe244e4a45a8eb9ea7fde0a968
#: ../src/Doc/c-api/module.rst:109
msgid ""
"Add an int constant to *module*. The name and the value are taken from "
"*macro*. For example ``PyModule_AddIntMacro(module, AF_INET)`` adds the int "
"constant *AF_INET* with the value of *AF_INET* to *module*. Return ``-1`` on "
"error, ``0`` on success."
msgstr ""
# 8ad878fe90e044bdab817e769f3f2e6c
#: ../src/Doc/c-api/module.rst:118
msgid "Add a string constant to *module*."
msgstr ""
#: ../src/Doc/c-api/none.rst:6
msgid "The None Object"
msgstr ""
# d2e3831f832b4922bba271f6f1ca952b
#: ../src/Doc/c-api/none.rst:10
msgid ""
"Note that the :c:type:`PyTypeObject` for ``None`` is not directly exposed in "
"the Python/C API. Since ``None`` is a singleton, testing for object "
"identity (using ``==`` in C) is sufficient. There is no :c:func:"
"`PyNone_Check` function for the same reason."
msgstr ""
# a656ba27118f4f058b91baae0d508f61
#: ../src/Doc/c-api/none.rst:18
msgid ""
"The Python ``None`` object, denoting lack of value. This object has no "
"methods. It needs to be treated just like any other object with respect to "
"reference counts."
msgstr ""
# bf78233ceb8f4b32a331de54fab92b81
#: ../src/Doc/c-api/none.rst:25
msgid "Properly handle returning :c:data:`Py_None` from within a C function."
msgstr ""
#: ../src/Doc/c-api/number.rst:6
msgid "Number Protocol"
msgstr ""
# fb1f4d8ddb894235b006e03bdff724d7
#: ../src/Doc/c-api/number.rst:11
msgid ""
"Returns ``1`` if the object *o* provides numeric protocols, and false "
"otherwise. This function always succeeds."
msgstr ""
# e0ac44866532415b8184ec900275441d
#: ../src/Doc/c-api/number.rst:17
msgid ""
"Returns the result of adding *o1* and *o2*, or *NULL* on failure. This is "
"the equivalent of the Python expression ``o1 + o2``."
msgstr ""
# c52938f3cd924e1d8f3dd016987dea51
#: ../src/Doc/c-api/number.rst:23
msgid ""
"Returns the result of subtracting *o2* from *o1*, or *NULL* on failure. "
"This is the equivalent of the Python expression ``o1 - o2``."
msgstr ""
# 1b85d3d188534d0b86c4426515a94699
#: ../src/Doc/c-api/number.rst:29
msgid ""
"Returns the result of multiplying *o1* and *o2*, or *NULL* on failure. This "
"is the equivalent of the Python expression ``o1 * o2``."
msgstr ""
# 996db359fe0c4f50bdb432955f0a2be1
#: ../src/Doc/c-api/number.rst:35
msgid ""
"Returns the result of dividing *o1* by *o2*, or *NULL* on failure. This is "
"the equivalent of the Python expression ``o1 / o2``."
msgstr ""
# b34c9db9317948ec846d2c5b4b6a486c
#: ../src/Doc/c-api/number.rst:41
msgid ""
"Return the floor of *o1* divided by *o2*, or *NULL* on failure. This is "
"equivalent to the \"classic\" division of integers."
msgstr ""
# fe931e2b894340e2aced5c959907274f
#: ../src/Doc/c-api/number.rst:49
msgid ""
"Return a reasonable approximation for the mathematical value of *o1* divided "
"by *o2*, or *NULL* on failure. The return value is \"approximate\" because "
"binary floating point numbers are approximate; it is not possible to "
"represent all real numbers in base two. This function can return a floating "
"point value when passed two integers."
msgstr ""
# cd43a87c36a04f8e8d618b239f67f458
#: ../src/Doc/c-api/number.rst:60
msgid ""
"Returns the remainder of dividing *o1* by *o2*, or *NULL* on failure. This "
"is the equivalent of the Python expression ``o1 % o2``."
msgstr ""
# 0be272509b6a44da9925200df90c7c3a
#: ../src/Doc/c-api/number.rst:68
msgid ""
"See the built-in function :func:`divmod`. Returns *NULL* on failure. This "
"is the equivalent of the Python expression ``divmod(o1, o2)``."
msgstr ""
# 866c5d5471be49d7aab2d8dbfb04dd53
#: ../src/Doc/c-api/number.rst:76
msgid ""
"See the built-in function :func:`pow`. Returns *NULL* on failure. This is "
"the equivalent of the Python expression ``pow(o1, o2, o3)``, where *o3* is "
"optional. If *o3* is to be ignored, pass :c:data:`Py_None` in its place "
"(passing *NULL* for *o3* would cause an illegal memory access)."
msgstr ""
# 21f06904665346bb91b1661fbbde95a7
#: ../src/Doc/c-api/number.rst:84
msgid ""
"Returns the negation of *o* on success, or *NULL* on failure. This is the "
"equivalent of the Python expression ``-o``."
msgstr ""
# 62777bb8393449df8a4fe16471c5915d
#: ../src/Doc/c-api/number.rst:90
msgid ""
"Returns *o* on success, or *NULL* on failure. This is the equivalent of the "
"Python expression ``+o``."
msgstr ""
# eace4b5284814de6975a3636432dd37d
#: ../src/Doc/c-api/number.rst:98
msgid ""
"Returns the absolute value of *o*, or *NULL* on failure. This is the "
"equivalent of the Python expression ``abs(o)``."
msgstr ""
# 0d1825a909f54f75932cb93d289af714
#: ../src/Doc/c-api/number.rst:104
msgid ""
"Returns the bitwise negation of *o* on success, or *NULL* on failure. This "
"is the equivalent of the Python expression ``~o``."
msgstr ""
# 464b689f80dd4067ad697fa1ff3aaa75
#: ../src/Doc/c-api/number.rst:110
msgid ""
"Returns the result of left shifting *o1* by *o2* on success, or *NULL* on "
"failure. This is the equivalent of the Python expression ``o1 << o2``."
msgstr ""
# c6f308d4edc742eebf2e5dadf33f4419
#: ../src/Doc/c-api/number.rst:116
msgid ""
"Returns the result of right shifting *o1* by *o2* on success, or *NULL* on "
"failure. This is the equivalent of the Python expression ``o1 >> o2``."
msgstr ""
# cde5bd66693249e79810a810ec101b50
#: ../src/Doc/c-api/number.rst:122
msgid ""
"Returns the \"bitwise and\" of *o1* and *o2* on success and *NULL* on "
"failure. This is the equivalent of the Python expression ``o1 & o2``."
msgstr ""
# 37d5ea0d2c9e48dab0e6d6da886e6f62
#: ../src/Doc/c-api/number.rst:128
msgid ""
"Returns the \"bitwise exclusive or\" of *o1* by *o2* on success, or *NULL* "
"on failure. This is the equivalent of the Python expression ``o1 ^ o2``."
msgstr ""
# 20bd9ad563e04519af388503f4c155f3
#: ../src/Doc/c-api/number.rst:134
msgid ""
"Returns the \"bitwise or\" of *o1* and *o2* on success, or *NULL* on "
"failure. This is the equivalent of the Python expression ``o1 | o2``."
msgstr ""
# d10ddded107f4e1692239ed63b5f1584
#: ../src/Doc/c-api/number.rst:140
msgid ""
"Returns the result of adding *o1* and *o2*, or *NULL* on failure. The "
"operation is done *in-place* when *o1* supports it. This is the equivalent "
"of the Python statement ``o1 += o2``."
msgstr ""
# 69e953f4c9874e4eaf5fe078d25c67b2
#: ../src/Doc/c-api/number.rst:147
msgid ""
"Returns the result of subtracting *o2* from *o1*, or *NULL* on failure. The "
"operation is done *in-place* when *o1* supports it. This is the equivalent "
"of the Python statement ``o1 -= o2``."
msgstr ""
# f690d2a616174bd58bcaca8bb4ae9a95
#: ../src/Doc/c-api/number.rst:154
msgid ""
"Returns the result of multiplying *o1* and *o2*, or *NULL* on failure. The "
"operation is done *in-place* when *o1* supports it. This is the equivalent "
"of the Python statement ``o1 *= o2``."
msgstr ""
# 517a8fabade4405d8585af1347233b6b
#: ../src/Doc/c-api/number.rst:161
msgid ""
"Returns the result of dividing *o1* by *o2*, or *NULL* on failure. The "
"operation is done *in-place* when *o1* supports it. This is the equivalent "
"of the Python statement ``o1 /= o2``."
msgstr ""
# 7c07e411210a441cbe37c8d54be09968
#: ../src/Doc/c-api/number.rst:168
msgid ""
"Returns the mathematical floor of dividing *o1* by *o2*, or *NULL* on "
"failure. The operation is done *in-place* when *o1* supports it. This is "
"the equivalent of the Python statement ``o1 //= o2``."
msgstr ""
# 627fa73f606c4d84a152decc37df3f5f
#: ../src/Doc/c-api/number.rst:177
msgid ""
"Return a reasonable approximation for the mathematical value of *o1* divided "
"by *o2*, or *NULL* on failure. The return value is \"approximate\" because "
"binary floating point numbers are approximate; it is not possible to "
"represent all real numbers in base two. This function can return a floating "
"point value when passed two integers. The operation is done *in-place* when "
"*o1* supports it."
msgstr ""
# 1cd2ceb7113f4ed69c3dc8a0dfb17e20
#: ../src/Doc/c-api/number.rst:188
msgid ""
"Returns the remainder of dividing *o1* by *o2*, or *NULL* on failure. The "
"operation is done *in-place* when *o1* supports it. This is the equivalent "
"of the Python statement ``o1 %= o2``."
msgstr ""
# 28a88f92889f48089704663e6c4b53cf
#: ../src/Doc/c-api/number.rst:197
msgid ""
"See the built-in function :func:`pow`. Returns *NULL* on failure. The "
"operation is done *in-place* when *o1* supports it. This is the equivalent "
"of the Python statement ``o1 **= o2`` when o3 is :c:data:`Py_None`, or an in-"
"place variant of ``pow(o1, o2, o3)`` otherwise. If *o3* is to be ignored, "
"pass :c:data:`Py_None` in its place (passing *NULL* for *o3* would cause an "
"illegal memory access)."
msgstr ""
# 3276523decf3422b8c9887cd35fd0376
#: ../src/Doc/c-api/number.rst:206
msgid ""
"Returns the result of left shifting *o1* by *o2* on success, or *NULL* on "
"failure. The operation is done *in-place* when *o1* supports it. This is "
"the equivalent of the Python statement ``o1 <<= o2``."
msgstr ""
# 8a276abe897a4b339758c652a36d5551
#: ../src/Doc/c-api/number.rst:213
msgid ""
"Returns the result of right shifting *o1* by *o2* on success, or *NULL* on "
"failure. The operation is done *in-place* when *o1* supports it. This is "
"the equivalent of the Python statement ``o1 >>= o2``."
msgstr ""
# 091a8db3522c4ff985ec58122907b282
#: ../src/Doc/c-api/number.rst:220
msgid ""
"Returns the \"bitwise and\" of *o1* and *o2* on success and *NULL* on "
"failure. The operation is done *in-place* when *o1* supports it. This is "
"the equivalent of the Python statement ``o1 &= o2``."
msgstr ""
# 564da48a894a4a5fa25dd59fc4f7fb48
#: ../src/Doc/c-api/number.rst:227
msgid ""
"Returns the \"bitwise exclusive or\" of *o1* by *o2* on success, or *NULL* "
"on failure. The operation is done *in-place* when *o1* supports it. This "
"is the equivalent of the Python statement ``o1 ^= o2``."
msgstr ""
# f472d7a032fb4ea7b4c5d2925bd998a4
#: ../src/Doc/c-api/number.rst:234
msgid ""
"Returns the \"bitwise or\" of *o1* and *o2* on success, or *NULL* on "
"failure. The operation is done *in-place* when *o1* supports it. This is "
"the equivalent of the Python statement ``o1 |= o2``."
msgstr ""
# 8d43527f093f457aaeb722cecd4dd6d5
#: ../src/Doc/c-api/number.rst:243
msgid ""
"This function takes the addresses of two variables of type :c:type:`PyObject"
"\\*`. If the objects pointed to by ``*p1`` and ``*p2`` have the same type, "
"increment their reference count and return ``0`` (success). If the objects "
"can be converted to a common numeric type, replace ``*p1`` and ``*p2`` by "
"their converted value (with 'new' reference counts), and return ``0``. If no "
"conversion is possible, or if some other error occurs, return ``-1`` "
"(failure) and don't increment the reference counts. The call "
"``PyNumber_Coerce(&o1, &o2)`` is equivalent to the Python statement ``o1, o2 "
"= coerce(o1, o2)``."
msgstr ""
# e88cb1576deb4e44bf5054dffc4a9120
#: ../src/Doc/c-api/number.rst:255
msgid ""
"This function is similar to :c:func:`PyNumber_Coerce`, except that it "
"returns ``1`` when the conversion is not possible and when no error is "
"raised. Reference counts are still not increased in this case."
msgstr ""
# 6ac903d5576c4ed0bcf6d6f7f4e2ba5e
#: ../src/Doc/c-api/number.rst:264
msgid ""
"Returns the *o* converted to an integer object on success, or *NULL* on "
"failure. If the argument is outside the integer range a long object will be "
"returned instead. This is the equivalent of the Python expression ``int(o)``."
msgstr ""
# 0c73f8becf524055a6755600dd440b60
#: ../src/Doc/c-api/number.rst:273
msgid ""
"Returns the *o* converted to a long integer object on success, or *NULL* on "
"failure. This is the equivalent of the Python expression ``long(o)``."
msgstr ""
# 17b8f30bf99d4418a65cf12bfc2e98f7
#: ../src/Doc/c-api/number.rst:281
msgid ""
"Returns the *o* converted to a float object on success, or *NULL* on "
"failure. This is the equivalent of the Python expression ``float(o)``."
msgstr ""
# 1c1a861e5ec343f79649577e89c55fc8
#: ../src/Doc/c-api/number.rst:287
msgid ""
"Returns the *o* converted to a Python int or long on success or *NULL* with "
"a :exc:`TypeError` exception raised on failure."
msgstr ""
# 9302126570a445deaefc9c2dff9bf84d
#: ../src/Doc/c-api/number.rst:295
msgid ""
"Returns the integer *n* converted to *base* as a string with a base marker "
"of ``'0b'``, ``'0o'``, or ``'0x'`` if applicable. When *base* is not 2, 8, "
"10, or 16, the format is ``'x#num'`` where x is the base. If *n* is not an "
"int object, it is converted with :c:func:`PyNumber_Index` first."
msgstr ""
# 15c425dd2b644e098a45f09b4475f208
#: ../src/Doc/c-api/number.rst:306
msgid ""
"Returns *o* converted to a Py_ssize_t value if *o* can be interpreted as an "
"integer. If *o* can be converted to a Python int or long but the attempt to "
"convert to a Py_ssize_t value would raise an :exc:`OverflowError`, then the "
"*exc* argument is the type of exception that will be raised (usually :exc:"
"`IndexError` or :exc:`OverflowError`). If *exc* is *NULL*, then the "
"exception is cleared and the value is clipped to *PY_SSIZE_T_MIN* for a "
"negative integer or *PY_SSIZE_T_MAX* for a positive integer."
msgstr ""
# 2088bc74892642acadd48d3cbef8519b
#: ../src/Doc/c-api/number.rst:319
msgid ""
"Returns True if *o* is an index integer (has the nb_index slot of the "
"tp_as_number structure filled in)."
msgstr ""
# e06f49aab963421db4ddcfb848e64838
#: ../src/Doc/c-api/objbuffer.rst:7
msgid "Old Buffer Protocol"
msgstr ""
# faf223ce616b4a65bc93c2fb3013271c
#: ../src/Doc/c-api/objbuffer.rst:9
msgid ""
"This section describes the legacy buffer protocol, which has been introduced "
"in Python 1.6. It is still supported but deprecated in the Python 2.x "
"series. Python 3 introduces a new buffer protocol which fixes weaknesses and "
"shortcomings of the protocol, and has been backported to Python 2.6. See :"
"ref:`bufferobjects` for more information."
msgstr ""
# d7028cec11c64ab8abe916d8cab45f11
#: ../src/Doc/c-api/objbuffer.rst:18
msgid ""
"Returns a pointer to a read-only memory location usable as character-based "
"input. The *obj* argument must support the single-segment character buffer "
"interface. On success, returns ``0``, sets *buffer* to the memory location "
"and *buffer_len* to the buffer length. Returns ``-1`` and sets a :exc:"
"`TypeError` on error."
msgstr ""
# 2e84869b611b4d75b2dd33c992283b81
#: ../src/Doc/c-api/objbuffer.rst:33
msgid ""
"Returns a pointer to a read-only memory location containing arbitrary data. "
"The *obj* argument must support the single-segment readable buffer "
"interface. On success, returns ``0``, sets *buffer* to the memory location "
"and *buffer_len* to the buffer length. Returns ``-1`` and sets a :exc:"
"`TypeError` on error."
msgstr ""
# 318e6acff55049f9b087ca2b76df3f1e
#: ../src/Doc/c-api/objbuffer.rst:48
msgid ""
"Returns ``1`` if *o* supports the single-segment readable buffer interface. "
"Otherwise returns ``0``."
msgstr ""
# 45b8a024750542b5beb4cf22f84ed043
#: ../src/Doc/c-api/objbuffer.rst:56
msgid ""
"Returns a pointer to a writeable memory location. The *obj* argument must "
"support the single-segment, character buffer interface. On success, returns "
"``0``, sets *buffer* to the memory location and *buffer_len* to the buffer "
"length. Returns ``-1`` and sets a :exc:`TypeError` on error."
msgstr ""
#: ../src/Doc/c-api/object.rst:6
msgid "Object Protocol"
msgstr ""
# a5a23f91d4ed4a72ad77f9c88e23e52a
#: ../src/Doc/c-api/object.rst:11
msgid ""
"Print an object *o*, on file *fp*. Returns ``-1`` on error. The flags "
"argument is used to enable certain printing options. The only option "
"currently supported is :const:`Py_PRINT_RAW`; if given, the :func:`str` of "
"the object is written instead of the :func:`repr`."
msgstr ""
# 6af3c89ffc8a467ab53cd9fcdb4b7a13
# b79db3e48f9e4505b3d68ff264c782cf
#: ../src/Doc/c-api/object.rst:19 ../src/Doc/c-api/object.rst:26
msgid ""
"Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise. "
"This is equivalent to the Python expression ``hasattr(o, attr_name)``. This "
"function always succeeds."
msgstr ""
# ce0b695f9da54c5f84b4f9c169156128
#: ../src/Doc/c-api/object.rst:33
msgid ""
"Retrieve an attribute named *attr_name* from object *o*. Returns the "
"attribute value on success, or *NULL* on failure. This is the equivalent of "
"the Python expression ``o.attr_name``."
msgstr ""
# 1c2d578cd91a49a098c29296089494d0
#: ../src/Doc/c-api/object.rst:40
msgid ""
"Retrieve an attribute named *attr_name* from object *o*. Returns the "
"attribute value on success, or *NULL* on failure. This is the equivalent of "
"the Python expression ``o.attr_name``."
msgstr ""
# e4e41520aefb411486e306c7053c8744
#: ../src/Doc/c-api/object.rst:47
msgid ""
"Generic attribute getter function that is meant to be put into a type "
"object's ``tp_getattro`` slot. It looks for a descriptor in the dictionary "
"of classes in the object's MRO as well as an attribute in the object's :attr:"
"`~object.__dict__` (if present). As outlined in :ref:`descriptors`, data "
"descriptors take preference over instance attributes, while non-data "
"descriptors don't. Otherwise, an :exc:`AttributeError` is raised."
msgstr ""
# 96ddb812334a4cd692b0c6595a9d0f24
# ce671e532c90471da53876eb1f2c76d3
#: ../src/Doc/c-api/object.rst:57 ../src/Doc/c-api/object.rst:64
msgid ""
"Set the value of the attribute named *attr_name*, for object *o*, to the "
"value *v*. Returns ``-1`` on failure. This is the equivalent of the Python "
"statement ``o.attr_name = v``."
msgstr ""
# 897fb33508e84b6e88a8bd3258014f2d
#: ../src/Doc/c-api/object.rst:71
msgid ""
"Generic attribute setter function that is meant to be put into a type "
"object's ``tp_setattro`` slot. It looks for a data descriptor in the "
"dictionary of classes in the object's MRO, and if found it takes preference "
"over setting the attribute in the instance dictionary. Otherwise, the "
"attribute is set in the object's :attr:`~object.__dict__` (if present). "
"Otherwise, an :exc:`AttributeError` is raised and ``-1`` is returned."
msgstr ""
# ff9584e04f0044cba077385ba14fa6ea
# c79ec4ef776348e0b8db977b8bdc8d78
#: ../src/Doc/c-api/object.rst:81 ../src/Doc/c-api/object.rst:87
msgid ""
"Delete attribute named *attr_name*, for object *o*. Returns ``-1`` on "
"failure. This is the equivalent of the Python statement ``del o.attr_name``."
msgstr ""
# bb2df8d228de424d8fd8b04ed3e42e13
#: ../src/Doc/c-api/object.rst:93
msgid ""
"Compare the values of *o1* and *o2* using the operation specified by *opid*, "
"which must be one of :const:`Py_LT`, :const:`Py_LE`, :const:`Py_EQ`, :const:"
"`Py_NE`, :const:`Py_GT`, or :const:`Py_GE`, corresponding to ``<``, ``<=``, "
"``==``, ``!=``, ``>``, or ``>=`` respectively. This is the equivalent of the "
"Python expression ``o1 op o2``, where ``op`` is the operator corresponding "
"to *opid*. Returns the value of the comparison on success, or *NULL* on "
"failure."
msgstr ""
# 9f86c68d815c47fab2953e3ae67c1132
#: ../src/Doc/c-api/object.rst:103
msgid ""
"Compare the values of *o1* and *o2* using the operation specified by *opid*, "
"which must be one of :const:`Py_LT`, :const:`Py_LE`, :const:`Py_EQ`, :const:"
"`Py_NE`, :const:`Py_GT`, or :const:`Py_GE`, corresponding to ``<``, ``<=``, "
"``==``, ``!=``, ``>``, or ``>=`` respectively. Returns ``-1`` on error, "
"``0`` if the result is false, ``1`` otherwise. This is the equivalent of the "
"Python expression ``o1 op o2``, where ``op`` is the operator corresponding "
"to *opid*."
msgstr ""
# 7e05f13334c1476ba2192f6406db686e
#: ../src/Doc/c-api/object.rst:112
msgid ""
"If *o1* and *o2* are the same object, :c:func:`PyObject_RichCompareBool` "
"will always return ``1`` for :const:`Py_EQ` and ``0`` for :const:`Py_NE`."
msgstr ""
# 2d5198c254904d84a597a5d68f3c4e1e
#: ../src/Doc/c-api/object.rst:119
msgid ""
"Compare the values of *o1* and *o2* using a routine provided by *o1*, if one "
"exists, otherwise with a routine provided by *o2*. The result of the "
"comparison is returned in *result*. Returns ``-1`` on failure. This is the "
"equivalent of the Python statement ``result = cmp(o1, o2)``."
msgstr ""
# d518e592747f436d8ca324695c737480
#: ../src/Doc/c-api/object.rst:129
msgid ""
"Compare the values of *o1* and *o2* using a routine provided by *o1*, if one "
"exists, otherwise with a routine provided by *o2*. Returns the result of "
"the comparison on success. On error, the value returned is undefined; use :"
"c:func:`PyErr_Occurred` to detect an error. This is equivalent to the "
"Python expression ``cmp(o1, o2)``."
msgstr ""
# 2b6273ab5b734122863a4e0bf24f8f6c
#: ../src/Doc/c-api/object.rst:140
msgid ""
"Compute a string representation of object *o*. Returns the string "
"representation on success, *NULL* on failure. This is the equivalent of the "
"Python expression ``repr(o)``. Called by the :func:`repr` built-in function "
"and by reverse quotes."
msgstr ""
# 753cba6821b84529ad0c782fb813f111
#: ../src/Doc/c-api/object.rst:150
msgid ""
"Compute a string representation of object *o*. Returns the string "
"representation on success, *NULL* on failure. This is the equivalent of the "
"Python expression ``str(o)``. Called by the :func:`str` built-in function "
"and by the :keyword:`print` statement."
msgstr ""
# e3d4770e920e45d09d2f7a06e3a7fa87
#: ../src/Doc/c-api/object.rst:160
msgid ""
"Compute a bytes representation of object *o*. In 2.x, this is just a alias "
"for :c:func:`PyObject_Str`."
msgstr ""
# 84bf7c2345014111a6efd376805d5c5b
#: ../src/Doc/c-api/object.rst:168
msgid ""
"Compute a Unicode string representation of object *o*. Returns the Unicode "
"string representation on success, *NULL* on failure. This is the equivalent "
"of the Python expression ``unicode(o)``. Called by the :func:`unicode` "
"built-in function."
msgstr ""
# 1abb3d3ecca4480cbc7751042f612305
#: ../src/Doc/c-api/object.rst:176
msgid ""
"Returns ``1`` if *inst* is an instance of the class *cls* or a subclass of "
"*cls*, or ``0`` if not. On error, returns ``-1`` and sets an exception. If "
"*cls* is a type object rather than a class object, :c:func:"
"`PyObject_IsInstance` returns ``1`` if *inst* is of type *cls*. If *cls* is "
"a tuple, the check will be done against every entry in *cls*. The result "
"will be ``1`` when at least one of the checks returns ``1``, otherwise it "
"will be ``0``. If *inst* is not a class instance and *cls* is neither a type "
"object, nor a class object, nor a tuple, *inst* must have a :attr:`~instance."
"__class__` attribute --- the class relationship of the value of that "
"attribute with *cls* will be used to determine the result of this function."
msgstr ""
# 704c94a22a174c19adfc9aa3d6aa2d30
#: ../src/Doc/c-api/object.rst:192
msgid ""
"Subclass determination is done in a fairly straightforward way, but includes "
"a wrinkle that implementors of extensions to the class system may want to be "
"aware of. If :class:`A` and :class:`B` are class objects, :class:`B` is a "
"subclass of :class:`A` if it inherits from :class:`A` either directly or "
"indirectly. If either is not a class object, a more general mechanism is "
"used to determine the class relationship of the two objects. When testing "
"if *B* is a subclass of *A*, if *A* is *B*, :c:func:`PyObject_IsSubclass` "
"returns true. If *A* and *B* are different objects, *B*'s :attr:`~class."
"__bases__` attribute is searched in a depth-first fashion for *A* --- the "
"presence of the :attr:`~class.__bases__` attribute is considered sufficient "
"for this determination."
msgstr ""
# 1e765d90e8b94a49919fa15b7d9b513a
#: ../src/Doc/c-api/object.rst:206
msgid ""
"Returns ``1`` if the class *derived* is identical to or derived from the "
"class *cls*, otherwise returns ``0``. In case of an error, returns ``-1``. "
"If *cls* is a tuple, the check will be done against every entry in *cls*. "
"The result will be ``1`` when at least one of the checks returns ``1``, "
"otherwise it will be ``0``. If either *derived* or *cls* is not an actual "
"class object (or tuple), this function uses the generic algorithm described "
"above."
msgstr ""
# 29fe41331b6f4f1eb8d24a83abb60a60
#: ../src/Doc/c-api/object.rst:221
msgid ""
"Determine if the object *o* is callable. Return ``1`` if the object is "
"callable and ``0`` otherwise. This function always succeeds."
msgstr ""
# 0480cb4629af442298b58730870a3bae
#: ../src/Doc/c-api/object.rst:229
msgid ""
"Call a callable Python object *callable_object*, with arguments given by the "
"tuple *args*, and named arguments given by the dictionary *kw*. If no named "
"arguments are needed, *kw* may be *NULL*. *args* must not be *NULL*, use an "
"empty tuple if no arguments are needed. Returns the result of the call on "
"success, or *NULL* on failure. This is the equivalent of the Python "
"expression ``apply(callable_object, args, kw)`` or ``callable_object(*args, "
"**kw)``."
msgstr ""
# c9923029a46a4a36812f72fc03d8ade2
#: ../src/Doc/c-api/object.rst:243
msgid ""
"Call a callable Python object *callable_object*, with arguments given by the "
"tuple *args*. If no arguments are needed, then *args* may be *NULL*. "
"Returns the result of the call on success, or *NULL* on failure. This is "
"the equivalent of the Python expression ``apply(callable_object, args)`` or "
"``callable_object(*args)``."
msgstr ""
# aba484c46a2b457c9a435d659562bcb4
#: ../src/Doc/c-api/object.rst:254
msgid ""
"Call a callable Python object *callable*, with a variable number of C "
"arguments. The C arguments are described using a :c:func:`Py_BuildValue` "
"style format string. The format may be *NULL*, indicating that no arguments "
"are provided. Returns the result of the call on success, or *NULL* on "
"failure. This is the equivalent of the Python expression ``apply(callable, "
"args)`` or ``callable(*args)``. Note that if you only pass :c:type:`PyObject "
"\\*` args, :c:func:`PyObject_CallFunctionObjArgs` is a faster alternative."
msgstr ""
# 64cdf230c4374d8095fd7da4af175c7d
#: ../src/Doc/c-api/object.rst:265
msgid ""
"Call the method named *method* of object *o* with a variable number of C "
"arguments. The C arguments are described by a :c:func:`Py_BuildValue` "
"format string that should produce a tuple. The format may be *NULL*, "
"indicating that no arguments are provided. Returns the result of the call on "
"success, or *NULL* on failure. This is the equivalent of the Python "
"expression ``o.method(args)``. Note that if you only pass :c:type:`PyObject "
"\\*` args, :c:func:`PyObject_CallMethodObjArgs` is a faster alternative."
msgstr ""
# 444e3fedb3b544f0aa4f0ea0cd736b85
#: ../src/Doc/c-api/object.rst:276
msgid ""
"Call a callable Python object *callable*, with a variable number of :c:type:"
"`PyObject\\*` arguments. The arguments are provided as a variable number of "
"parameters followed by *NULL*. Returns the result of the call on success, or "
"*NULL* on failure."
msgstr ""
# d7e76027d3914a46aff16749a394bb1c
#: ../src/Doc/c-api/object.rst:286
msgid ""
"Calls a method of the object *o*, where the name of the method is given as a "
"Python string object in *name*. It is called with a variable number of :c:"
"type:`PyObject\\*` arguments. The arguments are provided as a variable "
"number of parameters followed by *NULL*. Returns the result of the call on "
"success, or *NULL* on failure."
msgstr ""
# 6c65e71476424638b04972c3c7ecb482
#: ../src/Doc/c-api/object.rst:299
msgid ""
"Compute and return the hash value of an object *o*. On failure, return "
"``-1``. This is the equivalent of the Python expression ``hash(o)``."
msgstr ""
# 7bf26c71333a4a67b3d0ea794bc06f70
#: ../src/Doc/c-api/object.rst:305
msgid ""
"Set a :exc:`TypeError` indicating that ``type(o)`` is not hashable and "
"return ``-1``. This function receives special treatment when stored in a "
"``tp_hash`` slot, allowing a type to explicitly indicate to the interpreter "
"that it is not hashable."
msgstr ""
# c02d3815286744fc82e1a73d3fa78404
#: ../src/Doc/c-api/object.rst:315
msgid ""
"Returns ``1`` if the object *o* is considered to be true, and ``0`` "
"otherwise. This is equivalent to the Python expression ``not not o``. On "
"failure, return ``-1``."
msgstr ""
# 3bd110101a254d9d9d74b98efdda1f1d
#: ../src/Doc/c-api/object.rst:322
msgid ""
"Returns ``0`` if the object *o* is considered to be true, and ``1`` "
"otherwise. This is equivalent to the Python expression ``not o``. On "
"failure, return ``-1``."
msgstr ""
# a08123d8430f4433ba6058aa31e604a8
#: ../src/Doc/c-api/object.rst:331
msgid ""
"When *o* is non-*NULL*, returns a type object corresponding to the object "
"type of object *o*. On failure, raises :exc:`SystemError` and returns "
"*NULL*. This is equivalent to the Python expression ``type(o)``. This "
"function increments the reference count of the return value. There's really "
"no reason to use this function instead of the common expression ``o-"
">ob_type``, which returns a pointer of type :c:type:`PyTypeObject\\*`, "
"except when the incremented reference count is needed."
msgstr ""
# 62abba7120c243ff979d3a635acfd6bf
#: ../src/Doc/c-api/object.rst:342
msgid ""
"Return true if the object *o* is of type *type* or a subtype of *type*. "
"Both parameters must be non-*NULL*."
msgstr ""
# 418ca28fb24e4c6f9af2eb10686e1af6
#: ../src/Doc/c-api/object.rst:353
msgid ""
"Return the length of object *o*. If the object *o* provides either the "
"sequence and mapping protocols, the sequence length is returned. On error, "
"``-1`` is returned. This is the equivalent to the Python expression "
"``len(o)``."
msgstr ""
# 31d2fa180d714d94a2f277cbe5a0fd22
#: ../src/Doc/c-api/object.rst:370
msgid ""
"Map the object *key* to the value *v*. Returns ``-1`` on failure. This is "
"the equivalent of the Python statement ``o[key] = v``."
msgstr ""
# 076a8762e068483990c702c6f7ddad35
#: ../src/Doc/c-api/object.rst:376
msgid ""
"Delete the mapping for *key* from *o*. Returns ``-1`` on failure. This is "
"the equivalent of the Python statement ``del o[key]``."
msgstr ""
# 2aacc461ee4248e3a56d471fadb1ff08
#: ../src/Doc/c-api/object.rst:382
msgid ""
"Derives a file descriptor from a Python object. If the object is an integer "
"or long integer, its value is returned. If not, the object's :meth:`fileno` "
"method is called if it exists; the method must return an integer or long "
"integer, which is returned as the file descriptor value. Returns ``-1`` on "
"failure."
msgstr ""
# 5d92a5e5f6894b82a164b392b034161e
#: ../src/Doc/c-api/object.rst:390
msgid ""
"This is equivalent to the Python expression ``dir(o)``, returning a "
"(possibly empty) list of strings appropriate for the object argument, or "
"*NULL* if there was an error. If the argument is *NULL*, this is like the "
"Python ``dir()``, returning the names of the current locals; in this case, "
"if no execution frame is active then *NULL* is returned but :c:func:"
"`PyErr_Occurred` will return false."
msgstr ""
# 4899e522193240f79176550f162ed856
#: ../src/Doc/c-api/object.rst:399
msgid ""
"This is equivalent to the Python expression ``iter(o)``. It returns a new "
"iterator for the object argument, or the object itself if the object is "
"already an iterator. Raises :exc:`TypeError` and returns *NULL* if the "
"object cannot be iterated."
msgstr ""
#: ../src/Doc/c-api/objimpl.rst:8
msgid "Object Implementation Support"
msgstr ""
#: ../src/Doc/c-api/objimpl.rst:10
msgid ""
"This chapter describes the functions, types, and macros used when defining "
"new object types."
msgstr ""
#: ../src/Doc/c-api/refcounting.rst:8
msgid "Reference Counting"
msgstr ""
#: ../src/Doc/c-api/refcounting.rst:10
msgid ""
"The macros in this section are used for managing reference counts of Python "
"objects."
msgstr ""
# 50dc51acf54a400fad257e662cc4b348
#: ../src/Doc/c-api/refcounting.rst:16
msgid ""
"Increment the reference count for object *o*. The object must not be "
"*NULL*; if you aren't sure that it isn't *NULL*, use :c:func:`Py_XINCREF`."
msgstr ""
# 9558a868afff4a9bafd8b961a21d16b4
#: ../src/Doc/c-api/refcounting.rst:22
msgid ""
"Increment the reference count for object *o*. The object may be *NULL*, in "
"which case the macro has no effect."
msgstr ""
# abfeb6bde2a04e2abe47dd2c6e9a7335
#: ../src/Doc/c-api/refcounting.rst:28
msgid ""
"Decrement the reference count for object *o*. The object must not be "
"*NULL*; if you aren't sure that it isn't *NULL*, use :c:func:`Py_XDECREF`. "
"If the reference count reaches zero, the object's type's deallocation "
"function (which must not be *NULL*) is invoked."
msgstr ""
# 00ad7cf8247e42c6903ea7fb8a0a1729
#: ../src/Doc/c-api/refcounting.rst:35
msgid ""
"The deallocation function can cause arbitrary Python code to be invoked (e."
"g. when a class instance with a :meth:`__del__` method is deallocated). "
"While exceptions in such code are not propagated, the executed code has free "
"access to all Python global variables. This means that any object that is "
"reachable from a global variable should be in a consistent state before :c:"
"func:`Py_DECREF` is invoked. For example, code to delete an object from a "
"list should copy a reference to the deleted object in a temporary variable, "
"update the list data structure, and then call :c:func:`Py_DECREF` for the "
"temporary variable."
msgstr ""
# 9bfcb489abce4629bd259b5c4392c42e
#: ../src/Doc/c-api/refcounting.rst:47
msgid ""
"Decrement the reference count for object *o*. The object may be *NULL*, in "
"which case the macro has no effect; otherwise the effect is the same as for :"
"c:func:`Py_DECREF`, and the same warning applies."
msgstr ""
# fb693f34b1da4ea6bef4cd4280db76ac
#: ../src/Doc/c-api/refcounting.rst:54
msgid ""
"Decrement the reference count for object *o*. The object may be *NULL*, in "
"which case the macro has no effect; otherwise the effect is the same as for :"
"c:func:`Py_DECREF`, except that the argument is also set to *NULL*. The "
"warning for :c:func:`Py_DECREF` does not apply with respect to the object "
"passed because the macro carefully uses a temporary variable and sets the "
"argument to *NULL* before decrementing its reference count."
msgstr ""
# fd6e2953f59a428b88862938fe66d5e8
#: ../src/Doc/c-api/refcounting.rst:61
msgid ""
"It is a good idea to use this macro whenever decrementing the value of a "
"variable that might be traversed during garbage collection."
msgstr ""
# 348bdc3d973745798fa27125f2d09cd9
#: ../src/Doc/c-api/refcounting.rst:66
msgid ""
"The following functions are for runtime dynamic embedding of Python: "
"``Py_IncRef(PyObject *o)``, ``Py_DecRef(PyObject *o)``. They are simply "
"exported function versions of :c:func:`Py_XINCREF` and :c:func:`Py_XDECREF`, "
"respectively."
msgstr ""
# a44027bad169401ab090ff0739176555
#: ../src/Doc/c-api/refcounting.rst:71
msgid ""
"The following functions or macros are only for use within the interpreter "
"core: :c:func:`_Py_Dealloc`, :c:func:`_Py_ForgetReference`, :c:func:"
"`_Py_NewReference`, as well as the global variable :c:data:`_Py_RefTotal`."
msgstr ""
#: ../src/Doc/c-api/reflection.rst:6
msgid "Reflection"
msgstr ""
# 632dbd7a2c934994992da1674531f244
#: ../src/Doc/c-api/reflection.rst:10
msgid ""
"Return a dictionary of the builtins in the current execution frame, or the "
"interpreter of the thread state if no frame is currently executing."
msgstr ""
# 802a024007aa423b900da57babe9f200
#: ../src/Doc/c-api/reflection.rst:16
msgid ""
"Return a dictionary of the local variables in the current execution frame, "
"or *NULL* if no frame is currently executing."
msgstr ""
# 3b1be9a498044cd6be5a0801c244fad9
#: ../src/Doc/c-api/reflection.rst:22
msgid ""
"Return a dictionary of the global variables in the current execution frame, "
"or *NULL* if no frame is currently executing."
msgstr ""
# 2a9b058355484ee58d36f30f8dc9ea6e
#: ../src/Doc/c-api/reflection.rst:28
msgid ""
"Return the current thread state's frame, which is *NULL* if no frame is "
"currently executing."
msgstr ""
# bbb513d720e74392a3dbd95d472af479
#: ../src/Doc/c-api/reflection.rst:34
msgid "Return the line number that *frame* is currently executing."
msgstr ""
# 0f87ea65857c410fbe4ca09589c74baf
#: ../src/Doc/c-api/reflection.rst:39
msgid ""
"If there is a current frame and it is executing in restricted mode, return "
"true, otherwise false."
msgstr ""
# fdfec1918f584f498a9784cdbd15a30c
#: ../src/Doc/c-api/reflection.rst:45
msgid ""
"Return the name of *func* if it is a function, class or instance object, "
"else the name of *func*\\s type."
msgstr ""
# 5f225031b77947ae9df55fc4bfc87725
#: ../src/Doc/c-api/reflection.rst:51
msgid ""
"Return a description string, depending on the type of *func*. Return values "
"include \"()\" for functions and methods, \" constructor\", \" instance\", "
"and \" object\". Concatenated with the result of :c:func:"
"`PyEval_GetFuncName`, the result will be a description of *func*."
msgstr ""
#: ../src/Doc/c-api/sequence.rst:6
msgid "Sequence Protocol"
msgstr ""
# 62d02e3fa8964510bb527beafd532b85
#: ../src/Doc/c-api/sequence.rst:11
msgid ""
"Return ``1`` if the object provides sequence protocol, and ``0`` otherwise. "
"This function always succeeds."
msgstr ""
# 6a437b335a654321962bc1b8d89c384d
#: ../src/Doc/c-api/sequence.rst:20
msgid ""
"Returns the number of objects in sequence *o* on success, and ``-1`` on "
"failure. For objects that do not provide sequence protocol, this is "
"equivalent to the Python expression ``len(o)``."
msgstr ""
# 0253f573182c4feebebe0ecf13c2b146
#: ../src/Doc/c-api/sequence.rst:31
msgid ""
"Return the concatenation of *o1* and *o2* on success, and *NULL* on failure. "
"This is the equivalent of the Python expression ``o1 + o2``."
msgstr ""
# 301edc48665d426e9a135dd71f187ea0
#: ../src/Doc/c-api/sequence.rst:37
msgid ""
"Return the result of repeating sequence object *o* *count* times, or *NULL* "
"on failure. This is the equivalent of the Python expression ``o * count``."
msgstr ""
# f8f935dd1a4b47e6a7b2b9f1fe459d25
#: ../src/Doc/c-api/sequence.rst:47
msgid ""
"Return the concatenation of *o1* and *o2* on success, and *NULL* on failure. "
"The operation is done *in-place* when *o1* supports it. This is the "
"equivalent of the Python expression ``o1 += o2``."
msgstr ""
# 40e270aedf07404d8ffad3cbbcd02088
#: ../src/Doc/c-api/sequence.rst:54
msgid ""
"Return the result of repeating sequence object *o* *count* times, or *NULL* "
"on failure. The operation is done *in-place* when *o* supports it. This is "
"the equivalent of the Python expression ``o *= count``."
msgstr ""
# 6a30eefac5cc4ca6b342e2ee140d2eeb
#: ../src/Doc/c-api/sequence.rst:65
msgid ""
"Return the *i*\\ th element of *o*, or *NULL* on failure. This is the "
"equivalent of the Python expression ``o[i]``."
msgstr ""
# 47a14bb8517e4801b9e48c13cc89ce80
#: ../src/Doc/c-api/sequence.rst:75
msgid ""
"Return the slice of sequence object *o* between *i1* and *i2*, or *NULL* on "
"failure. This is the equivalent of the Python expression ``o[i1:i2]``."
msgstr ""
# 397ac4227c024af880e586ca0feb0b25
#: ../src/Doc/c-api/sequence.rst:85
msgid ""
"Assign object *v* to the *i*\\ th element of *o*. Returns ``-1`` on "
"failure. This is the equivalent of the Python statement ``o[i] = v``. This "
"function *does not* steal a reference to *v*."
msgstr ""
# f4a5e182aced47f9bee2e1ec169b4ef6
#: ../src/Doc/c-api/sequence.rst:96
msgid ""
"Delete the *i*\\ th element of object *o*. Returns ``-1`` on failure. This "
"is the equivalent of the Python statement ``del o[i]``."
msgstr ""
# c4e61006918a4325bfcc6fe36f059b46
#: ../src/Doc/c-api/sequence.rst:106
msgid ""
"Assign the sequence object *v* to the slice in sequence object *o* from *i1* "
"to *i2*. This is the equivalent of the Python statement ``o[i1:i2] = v``."
msgstr ""
# 12fd2450d6174de7bfed594917923729
#: ../src/Doc/c-api/sequence.rst:116
msgid ""
"Delete the slice in sequence object *o* from *i1* to *i2*. Returns ``-1`` "
"on failure. This is the equivalent of the Python statement ``del o[i1:i2]``."
msgstr ""
# f73f4c9bba7d4d88b1b4e78072ba5043
#: ../src/Doc/c-api/sequence.rst:126
msgid ""
"Return the number of occurrences of *value* in *o*, that is, return the "
"number of keys for which ``o[key] == value``. On failure, return ``-1``. "
"This is equivalent to the Python expression ``o.count(value)``."
msgstr ""
# 862dc107ca934d5ab6e5938fada0f2c2
#: ../src/Doc/c-api/sequence.rst:137
msgid ""
"Determine if *o* contains *value*. If an item in *o* is equal to *value*, "
"return ``1``, otherwise return ``0``. On error, return ``-1``. This is "
"equivalent to the Python expression ``value in o``."
msgstr ""
# eae59b5cb08e4a2e85449a2405fd04fb
#: ../src/Doc/c-api/sequence.rst:144
msgid ""
"Return the first index *i* for which ``o[i] == value``. On error, return "
"``-1``. This is equivalent to the Python expression ``o.index(value)``."
msgstr ""
# a126b4651162437fb506baf2fab51fe4
#: ../src/Doc/c-api/sequence.rst:154
msgid ""
"Return a list object with the same contents as the arbitrary sequence *o*. "
"The returned list is guaranteed to be new."
msgstr ""
# 0bd4e22ec55d4ec0b1bd27e50c20adfb
#: ../src/Doc/c-api/sequence.rst:162
msgid ""
"Return a tuple object with the same contents as the arbitrary sequence *o* "
"or *NULL* on failure. If *o* is a tuple, a new reference will be returned, "
"otherwise a tuple will be constructed with the appropriate contents. This "
"is equivalent to the Python expression ``tuple(o)``."
msgstr ""
# 2bc02774d1cd4033956870e72edffb13
#: ../src/Doc/c-api/sequence.rst:170
msgid ""
"Return the sequence *o* as a list, unless it is already a tuple or list, in "
"which case *o* is returned. Use :c:func:`PySequence_Fast_GET_ITEM` to "
"access the members of the result. Returns *NULL* on failure. If the object "
"is not a sequence, raises :exc:`TypeError` with *m* as the message text."
msgstr ""
# 2faf4e7a29094ff9837462485c45e2f0
#: ../src/Doc/c-api/sequence.rst:178
msgid ""
"Return the *i*\\ th element of *o*, assuming that *o* was returned by :c:"
"func:`PySequence_Fast`, *o* is not *NULL*, and that *i* is within bounds."
msgstr ""
# b850abc6ada644b9903b0448e0eb445f
#: ../src/Doc/c-api/sequence.rst:188
msgid ""
"Return the underlying array of PyObject pointers. Assumes that *o* was "
"returned by :c:func:`PySequence_Fast` and *o* is not *NULL*."
msgstr ""
# 39ba45cf36f840f7bff0da1d7c741522
#: ../src/Doc/c-api/sequence.rst:191
msgid ""
"Note, if a list gets resized, the reallocation may relocate the items array. "
"So, only use the underlying array pointer in contexts where the sequence "
"cannot change."
msgstr ""
# f9d026a671c348dfb3446938272c8100
#: ../src/Doc/c-api/sequence.rst:200
msgid ""
"Return the *i*\\ th element of *o* or *NULL* on failure. Macro form of :c:"
"func:`PySequence_GetItem` but without checking that :c:func:"
"`PySequence_Check` on *o* is true and without adjustment for negative "
"indices."
msgstr ""
# 005b68bfe5ed4af3957a717213c08969
#: ../src/Doc/c-api/sequence.rst:214
msgid ""
"Returns the length of *o*, assuming that *o* was returned by :c:func:"
"`PySequence_Fast` and that *o* is not *NULL*. The size can also be gotten "
"by calling :c:func:`PySequence_Size` on *o*, but :c:func:"
"`PySequence_Fast_GET_SIZE` is faster because it can assume *o* is a list or "
"tuple."
msgstr ""
#: ../src/Doc/c-api/set.rst:6
msgid "Set Objects"
msgstr ""
# 20591268cdfd4d40a1515a8cf2dbe859
#: ../src/Doc/c-api/set.rst:17
msgid ""
"This section details the public API for :class:`set` and :class:`frozenset` "
"objects. Any functionality not listed below is best accessed using the "
"either the abstract object protocol (including :c:func:"
"`PyObject_CallMethod`, :c:func:`PyObject_RichCompareBool`, :c:func:"
"`PyObject_Hash`, :c:func:`PyObject_Repr`, :c:func:`PyObject_IsTrue`, :c:func:"
"`PyObject_Print`, and :c:func:`PyObject_GetIter`) or the abstract number "
"protocol (including :c:func:`PyNumber_And`, :c:func:`PyNumber_Subtract`, :c:"
"func:`PyNumber_Or`, :c:func:`PyNumber_Xor`, :c:func:`PyNumber_InPlaceAnd`, :"
"c:func:`PyNumber_InPlaceSubtract`, :c:func:`PyNumber_InPlaceOr`, and :c:func:"
"`PyNumber_InPlaceXor`)."
msgstr ""
# cd09f553adbe47d4af5ee85399265c39
#: ../src/Doc/c-api/set.rst:31
msgid ""
"This subtype of :c:type:`PyObject` is used to hold the internal data for "
"both :class:`set` and :class:`frozenset` objects. It is like a :c:type:"
"`PyDictObject` in that it is a fixed size for small sets (much like tuple "
"storage) and will point to a separate, variable sized block of memory for "
"medium and large sized sets (much like list storage). None of the fields of "
"this structure should be considered public and are subject to change. All "
"access should be done through the documented API rather than by manipulating "
"the values in the structure."
msgstr ""
# 906518e85026451ba68be39bbacb3ab0
#: ../src/Doc/c-api/set.rst:42
msgid ""
"This is an instance of :c:type:`PyTypeObject` representing the Python :class:"
"`set` type."
msgstr ""
# ef4d0e943c9443e68a15c790cefbfff8
#: ../src/Doc/c-api/set.rst:48
msgid ""
"This is an instance of :c:type:`PyTypeObject` representing the Python :class:"
"`frozenset` type."
msgstr ""
#: ../src/Doc/c-api/set.rst:51
msgid ""
"The following type check macros work on pointers to any Python object. "
"Likewise, the constructor functions work with any iterable Python object."
msgstr ""
# 3352d6050f734b078ee4172b89d7bba5
#: ../src/Doc/c-api/set.rst:57
msgid ""
"Return true if *p* is a :class:`set` object or an instance of a subtype."
msgstr ""
# 77ad96ffb4224875afa482ccbabd13f2
#: ../src/Doc/c-api/set.rst:63
msgid ""
"Return true if *p* is a :class:`frozenset` object or an instance of a "
"subtype."
msgstr ""
# e4e75564f2f3470a8aa267bf4dd50407
#: ../src/Doc/c-api/set.rst:70
msgid ""
"Return true if *p* is a :class:`set` object, a :class:`frozenset` object, or "
"an instance of a subtype."
msgstr ""
# baf8cd1d12744392b83ab300e19ea652
#: ../src/Doc/c-api/set.rst:76
msgid ""
"Return true if *p* is a :class:`set` object or a :class:`frozenset` object "
"but not an instance of a subtype."
msgstr ""
# 9213d8b6558448d4884d561e5a17c42a
#: ../src/Doc/c-api/set.rst:82
msgid ""
"Return true if *p* is a :class:`frozenset` object but not an instance of a "
"subtype."
msgstr ""
# 1c8e58b758284cd1a6a794963172c1c5
#: ../src/Doc/c-api/set.rst:88
msgid ""
"Return a new :class:`set` containing objects returned by the *iterable*. "
"The *iterable* may be *NULL* to create a new empty set. Return the new set "
"on success or *NULL* on failure. Raise :exc:`TypeError` if *iterable* is "
"not actually iterable. The constructor is also useful for copying a set "
"(``c=set(s)``)."
msgstr ""
# 9feae6fd459746d9ab1fba4b500d477a
#: ../src/Doc/c-api/set.rst:97
msgid ""
"Return a new :class:`frozenset` containing objects returned by the "
"*iterable*. The *iterable* may be *NULL* to create a new empty frozenset. "
"Return the new set on success or *NULL* on failure. Raise :exc:`TypeError` "
"if *iterable* is not actually iterable."
msgstr ""
#: ../src/Doc/c-api/set.rst:107
msgid ""
"The following functions and macros are available for instances of :class:"
"`set` or :class:`frozenset` or instances of their subtypes."
msgstr ""
# 2f177941f8fc43d9aa6541efab0e52bc
#: ../src/Doc/c-api/set.rst:115
msgid ""
"Return the length of a :class:`set` or :class:`frozenset` object. Equivalent "
"to ``len(anyset)``. Raises a :exc:`PyExc_SystemError` if *anyset* is not a :"
"class:`set`, :class:`frozenset`, or an instance of a subtype."
msgstr ""
# 78ff957f1ad64b0c9c00bfa70335f27f
#: ../src/Doc/c-api/set.rst:126
msgid "Macro form of :c:func:`PySet_Size` without error checking."
msgstr ""
# 3b3f4b06315747b583de732f3d06ae97
#: ../src/Doc/c-api/set.rst:131
msgid ""
"Return 1 if found, 0 if not found, and -1 if an error is encountered. "
"Unlike the Python :meth:`__contains__` method, this function does not "
"automatically convert unhashable sets into temporary frozensets. Raise a :"
"exc:`TypeError` if the *key* is unhashable. Raise :exc:`PyExc_SystemError` "
"if *anyset* is not a :class:`set`, :class:`frozenset`, or an instance of a "
"subtype."
msgstr ""
# 852b0baded61426796629de3376610fb
#: ../src/Doc/c-api/set.rst:140
msgid ""
"Add *key* to a :class:`set` instance. Does not apply to :class:`frozenset` "
"instances. Return 0 on success or -1 on failure. Raise a :exc:`TypeError` "
"if the *key* is unhashable. Raise a :exc:`MemoryError` if there is no room "
"to grow. Raise a :exc:`SystemError` if *set* is an not an instance of :class:"
"`set` or its subtype."
msgstr ""
#: ../src/Doc/c-api/set.rst:151
msgid ""
"The following functions are available for instances of :class:`set` or its "
"subtypes but not for instances of :class:`frozenset` or its subtypes."
msgstr ""
# d6b876f028de4ba5bba533943926e3f3
#: ../src/Doc/c-api/set.rst:157
msgid ""
"Return 1 if found and removed, 0 if not found (no action taken), and -1 if "
"an error is encountered. Does not raise :exc:`KeyError` for missing keys. "
"Raise a :exc:`TypeError` if the *key* is unhashable. Unlike the Python :"
"meth:`~set.discard` method, this function does not automatically convert "
"unhashable sets into temporary frozensets. Raise :exc:`PyExc_SystemError` if "
"*set* is an not an instance of :class:`set` or its subtype."
msgstr ""
# a38fd5ac10974a1dbfeb7312f4e17333
#: ../src/Doc/c-api/set.rst:167
msgid ""
"Return a new reference to an arbitrary object in the *set*, and removes the "
"object from the *set*. Return *NULL* on failure. Raise :exc:`KeyError` if "
"the set is empty. Raise a :exc:`SystemError` if *set* is an not an instance "
"of :class:`set` or its subtype."
msgstr ""
# bfdd73a7c6104b439232f1b50dbcc086
#: ../src/Doc/c-api/set.rst:175
msgid "Empty an existing set of all elements."
msgstr ""
#: ../src/Doc/c-api/slice.rst:6
msgid "Slice Objects"
msgstr ""
# cd31a5e867724b1a9bc423dd35c4f3c3
#: ../src/Doc/c-api/slice.rst:13
msgid ""
"The type object for slice objects. This is the same as ``slice`` and "
"``types.SliceType``."
msgstr ""
# cddc905dc01646a5b47dbad63adcd4cb
#: ../src/Doc/c-api/slice.rst:19
msgid "Return true if *ob* is a slice object; *ob* must not be *NULL*."
msgstr ""
# 4cb1f12a066a4a6f8e07b3a9fb2422ab
#: ../src/Doc/c-api/slice.rst:24
msgid ""
"Return a new slice object with the given values. The *start*, *stop*, and "
"*step* parameters are used as the values of the slice object attributes of "
"the same names. Any of the values may be *NULL*, in which case the ``None`` "
"will be used for the corresponding attribute. Return *NULL* if the new "
"object could not be allocated."
msgstr ""
# eb49e27c66af4dd8ace89b71d786aee7
#: ../src/Doc/c-api/slice.rst:33
msgid ""
"Retrieve the start, stop and step indices from the slice object *slice*, "
"assuming a sequence of length *length*. Treats indices greater than *length* "
"as errors."
msgstr ""
# f52567562c4745bf8eaa05f98f9c7b09
#: ../src/Doc/c-api/slice.rst:37
msgid ""
"Returns 0 on success and -1 on error with no exception set (unless one of "
"the indices was not :const:`None` and failed to be converted to an integer, "
"in which case -1 is returned with an exception set)."
msgstr ""
# 2ac7a64698d84a77a5b5829e560336a0
#: ../src/Doc/c-api/slice.rst:41
msgid ""
"You probably do not want to use this function. If you want to use slice "
"objects in versions of Python prior to 2.3, you would probably do well to "
"incorporate the source of :c:func:`PySlice_GetIndicesEx`, suitably renamed, "
"in the source of your extension."
msgstr ""
# d6fac51d218d4687b88b364f8fb3f00a
#: ../src/Doc/c-api/slice.rst:54
msgid ""
"Usable replacement for :c:func:`PySlice_GetIndices`. Retrieve the start, "
"stop, and step indices from the slice object *slice* assuming a sequence of "
"length *length*, and store the length of the slice in *slicelength*. Out of "
"bounds indices are clipped in a manner consistent with the handling of "
"normal slices."
msgstr ""
# 68e174a515dd4d9a89940e9844e5bc44
#: ../src/Doc/c-api/slice.rst:60
msgid "Returns 0 on success and -1 on error with exception set."
msgstr ""
#: ../src/Doc/c-api/string.rst:6
#, fuzzy
msgid "String/Bytes Objects"
msgstr "Objets bytes"
#: ../src/Doc/c-api/string.rst:8
#, fuzzy
msgid ""
"These functions raise :exc:`TypeError` when expecting a string parameter and "
"are called with a non-string parameter."
msgstr ""
"Ces fonctions lèvent :exc:`TypeError` lorsqu'elles attendent un paramètre de "
"type octets et qu'elles sont appelées avec un paramètre qui n'est pas un "
"octet."
# a4e843b9950e40b78204f3fdc0d4df02
#: ../src/Doc/c-api/string.rst:13
msgid ""
"These functions have been renamed to PyBytes_* in Python 3.x. Unless "
"otherwise noted, the PyBytes functions available in 3.x are aliased to their "
"PyString_* equivalents to help porting."
msgstr ""
# c66e44858edd40e8aed393f2ec707e3e
#: ../src/Doc/c-api/string.rst:22
msgid "This subtype of :c:type:`PyObject` represents a Python string object."
msgstr ""
# 0f9a798af5144d8686db348ac99897c9
#: ../src/Doc/c-api/string.rst:29
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python string type; "
"it is the same object as ``str`` and ``types.StringType`` in the Python "
"layer. ."
msgstr ""
# 7edc71af715e4610a6c7570face16624
#: ../src/Doc/c-api/string.rst:35
msgid ""
"Return true if the object *o* is a string object or an instance of a subtype "
"of the string type."
msgstr ""
# 069262a2cf464a7e95e7cf56a052b8f0
#: ../src/Doc/c-api/string.rst:44
msgid ""
"Return true if the object *o* is a string object, but not an instance of a "
"subtype of the string type."
msgstr ""
# 5eabbfe0245c4407932f0609f4acbcfd
#: ../src/Doc/c-api/string.rst:52
msgid ""
"Return a new string object with a copy of the string *v* as value on "
"success, and *NULL* on failure. The parameter *v* must not be *NULL*; it "
"will not be checked."
msgstr ""
# 49551be9fbf44825855b4244aaca42d3
#: ../src/Doc/c-api/string.rst:59
msgid ""
"Return a new string object with a copy of the string *v* as value and length "
"*len* on success, and *NULL* on failure. If *v* is *NULL*, the contents of "
"the string are uninitialized."
msgstr ""
# 2f64b065cb2043a4a545d407953b730f
#: ../src/Doc/c-api/string.rst:70
msgid ""
"Take a C :c:func:`printf`\\ -style *format* string and a variable number of "
"arguments, calculate the size of the resulting Python string and return a "
"string with the values formatted into it. The variable arguments must be C "
"types and must correspond exactly to the format characters in the *format* "
"string. The following format characters are allowed:"
msgstr ""
# 471e202ebf4e4151a20cb7aa6a7079be
# 98fcaf4a5f9e4607b69f3b79f6198a1f
#: ../src/Doc/c-api/string.rst:86 ../src/Doc/c-api/unicode.rst:258
msgid "Format Characters"
msgstr ""
# 88530ba6d9fd4860b20c93af176a0d15
# 022b15989650456e8d3bc00e236f72b7
#: ../src/Doc/c-api/string.rst:86 ../src/Doc/c-api/unicode.rst:258
msgid "Type"
msgstr ""
# a23a4861244740a28b4fe1435883053c
# 7c2d1bc75c494bce8956ce6a8c356701
#: ../src/Doc/c-api/string.rst:86 ../src/Doc/c-api/unicode.rst:258
msgid "Comment"
msgstr ""
# a0a5e8749e1b4c319c3628e8f64640e7
# 47cd76546ec64fa189a10560d06d64e2
#: ../src/Doc/c-api/string.rst:88 ../src/Doc/c-api/unicode.rst:260
msgid ":attr:`%%`"
msgstr ""
# 91146fe62bbe40cc97c01971f8a5c762
# a7d49deb9036495a8c93f01a608afe49
#: ../src/Doc/c-api/string.rst:88 ../src/Doc/c-api/unicode.rst:260
msgid "*n/a*"
msgstr ""
# 47ef9d5ed3434a16b3927275b4de3adc
# cdb6aaa7c94748bbb7d058933662c5f4
#: ../src/Doc/c-api/string.rst:88 ../src/Doc/c-api/unicode.rst:260
msgid "The literal % character."
msgstr ""
# 017d259794f84d45ba2339a3b1226279
# d3b8e9aab44d499194b5daa878971d71
#: ../src/Doc/c-api/string.rst:90 ../src/Doc/c-api/unicode.rst:262
msgid ":attr:`%c`"
msgstr ""
# 0bb9bb3cd0f143ad960fabe70c58c938
# f74377c46c86445b91a2643de2952593
# b752867c48274a4694ed8e7be6425845
# d629e08fefac4e3a939c57b78c29d2e6
# bda61cc57ae6487fabf0e391ef20aa6b
# b363dd2c15bb4ceabb9574b11dd85867
# fa80b9bddbb84c5ab74054701861af88
# 2adeeac0610e4fa9801b717821052829
# 41a187a81a8f4913959a7c421f2b67a7
# 3cdf1503bc634ad0bc8cf4558b764555
# 34586101c0b44952a39c10da66ecfc20
# afd0be3ddc6c4f5da6a275c1b704c6a3
#: ../src/Doc/c-api/string.rst:90 ../src/Doc/c-api/string.rst:93
#: ../src/Doc/c-api/string.rst:117 ../src/Doc/c-api/string.rst:120
#: ../src/Doc/c-api/structures.rst:114 ../src/Doc/c-api/structures.rst:238
#: ../src/Doc/c-api/structures.rst:245 ../src/Doc/c-api/structures.rst:261
#: ../src/Doc/c-api/unicode.rst:262 ../src/Doc/c-api/unicode.rst:265
#: ../src/Doc/c-api/unicode.rst:283 ../src/Doc/c-api/unicode.rst:286
msgid "int"
msgstr ""
# 3826ca8f016040c78fae85b6d557a0eb
# 30a2a0969c9e4a50ae835882d5cc750f
#: ../src/Doc/c-api/string.rst:90 ../src/Doc/c-api/unicode.rst:262
msgid "A single character, represented as an C int."
msgstr ""
# b78cf135d99a41de8e53ccff5942fdaa
# 20b7945f74934f3583ab72bac3846d53
#: ../src/Doc/c-api/string.rst:93 ../src/Doc/c-api/unicode.rst:265
msgid ":attr:`%d`"
msgstr ""
# b507884740224f7e82e4d03748138a28
# 0e914205a97c4dcd83e08b04244e9dea
#: ../src/Doc/c-api/string.rst:93 ../src/Doc/c-api/unicode.rst:265
msgid "Exactly equivalent to ``printf(\"%d\")``."
msgstr ""
# 1ad870217739468f8ccd67897b7d88d9
# d7296dede88748a5a64adcb39a3f2172
#: ../src/Doc/c-api/string.rst:96 ../src/Doc/c-api/unicode.rst:268
msgid ":attr:`%u`"
msgstr ""
# 31e65c04339444689e0b4d064d4d44df
# c2450f731840434c9ec30dad892973f3
# bb0d2b0af47c447fa8cdcb2cd1a98e4f
#: ../src/Doc/c-api/string.rst:96 ../src/Doc/c-api/structures.rst:271
#: ../src/Doc/c-api/unicode.rst:268
msgid "unsigned int"
msgstr ""
# 66566231bbd24cb1a55fe1676bca8209
# 242775253178477bbefc156f5d2e2bc8
#: ../src/Doc/c-api/string.rst:96 ../src/Doc/c-api/unicode.rst:268
msgid "Exactly equivalent to ``printf(\"%u\")``."
msgstr ""
# a26f980c431040e2abc2ca9de9be46c1
# ae3428f7aee043ad972afb45ccd5b8d0
#: ../src/Doc/c-api/string.rst:99 ../src/Doc/c-api/unicode.rst:271
msgid ":attr:`%ld`"
msgstr ""
# b7aef22979b143cd8f13a7738c83db80
# d7c8177bb87d43519536724b5681baa0
# 444094a444dd4f2b8c034ae17b088c19
#: ../src/Doc/c-api/string.rst:99 ../src/Doc/c-api/structures.rst:262
#: ../src/Doc/c-api/unicode.rst:271
msgid "long"
msgstr ""
# 402acd79eed84ff2a563f0fd692ba776
# 00016e818e734dfbacd4b69a5f6ec19a
#: ../src/Doc/c-api/string.rst:99 ../src/Doc/c-api/unicode.rst:271
msgid "Exactly equivalent to ``printf(\"%ld\")``."
msgstr ""
# 9ebedf39276f4817b1f14e46f5c25f5a
# 9e2d2d9850f04babb78c4191cbacf205
#: ../src/Doc/c-api/string.rst:102 ../src/Doc/c-api/unicode.rst:274
msgid ":attr:`%lu`"
msgstr ""
# 1227eacd602840b3ac60bbe7e29dc5f6
# 75f7304fae314180ac3a80eafd9a1224
# 4f63f2e200254355813f64e889c31d73
#: ../src/Doc/c-api/string.rst:102 ../src/Doc/c-api/structures.rst:273
#: ../src/Doc/c-api/unicode.rst:274
msgid "unsigned long"
msgstr ""
# 8473166c332548f3822a171d93a86440
# 230a9ff3e1084e9189982010ae906772
#: ../src/Doc/c-api/string.rst:102 ../src/Doc/c-api/unicode.rst:274
msgid "Exactly equivalent to ``printf(\"%lu\")``."
msgstr ""
# f52ebd06f99747aa9709ffbb240cdd44
#: ../src/Doc/c-api/string.rst:105
msgid ":attr:`%lld`"
msgstr ""
# 540d9e0334804a089c072653a0df6a7f
# 5a718378ebf74bd3b949ea69953a0a7d
#: ../src/Doc/c-api/string.rst:105 ../src/Doc/c-api/structures.rst:275
msgid "long long"
msgstr ""
# 36c430d1d4fa4306969906e17ff1ff00
#: ../src/Doc/c-api/string.rst:105
msgid "Exactly equivalent to ``printf(\"%lld\")``."
msgstr ""
# 16fea059721a4ca3a1d3c6b46d7e1acc
#: ../src/Doc/c-api/string.rst:108
msgid ":attr:`%llu`"
msgstr ""
# 4c8e9833130643d09f16e64306092a1e
# b1926b2785c14a3e994d85da71c6b3dc
#: ../src/Doc/c-api/string.rst:108 ../src/Doc/c-api/structures.rst:276
msgid "unsigned long long"
msgstr ""
# 51b579bb278046f89255ec42244f90db
#: ../src/Doc/c-api/string.rst:108
msgid "Exactly equivalent to ``printf(\"%llu\")``."
msgstr ""
# 44155af1f21d4369a8da63d181d2c33f
# db644f205e354dffac85b26b5bef0386
#: ../src/Doc/c-api/string.rst:111 ../src/Doc/c-api/unicode.rst:277
msgid ":attr:`%zd`"
msgstr ""
# fdf5fb05602b4be5acf7b111a758ded0
# f4673d0c2f0f4fbfbc56112fc3364d8d
# 21d7ce871c05475e816ccb068c3f141a
# 5027008a6b0c4ec2ba48128b44c5795d
#: ../src/Doc/c-api/string.rst:111 ../src/Doc/c-api/structures.rst:241
#: ../src/Doc/c-api/structures.rst:277 ../src/Doc/c-api/unicode.rst:277
msgid "Py_ssize_t"
msgstr ""
# 498804ab42d44433953086ac70a69fdc
# 41e13c97e3704ef78b4e4c254672aad9
#: ../src/Doc/c-api/string.rst:111 ../src/Doc/c-api/unicode.rst:277
msgid "Exactly equivalent to ``printf(\"%zd\")``."
msgstr ""
# 29b534e01043404aba9f567ace5edce1
# 3f73bc002d8a46c7b690e4630999f438
#: ../src/Doc/c-api/string.rst:114 ../src/Doc/c-api/unicode.rst:280
msgid ":attr:`%zu`"
msgstr ""
# f03f8ad9c2324d88a0205cbb3135b91b
# 554a691737d84a0f98b1cf04218305e0
#: ../src/Doc/c-api/string.rst:114 ../src/Doc/c-api/unicode.rst:280
msgid "size_t"
msgstr ""
# f77378cb62e34aaca4aaa94ba926fecc
# dfbf21f6dad6409e86a80e1a55f0eba8
#: ../src/Doc/c-api/string.rst:114 ../src/Doc/c-api/unicode.rst:280
msgid "Exactly equivalent to ``printf(\"%zu\")``."
msgstr ""
# 013c9d18003a40fca1f3f411136f2cef
# 8abbec4ca568440ba340018d4d83a499
#: ../src/Doc/c-api/string.rst:117 ../src/Doc/c-api/unicode.rst:283
msgid ":attr:`%i`"
msgstr ""
# 8df083ae5bb14d7c91ae80f4050d2064
# 602e1a9100cf4652b35ed8ad52463d15
#: ../src/Doc/c-api/string.rst:117 ../src/Doc/c-api/unicode.rst:283
msgid "Exactly equivalent to ``printf(\"%i\")``."
msgstr ""
# 6ef14ae3552f4dcabea627a47fb91e61
# 63256e8b2a7f4910be7a12e4b3d7300d
#: ../src/Doc/c-api/string.rst:120 ../src/Doc/c-api/unicode.rst:286
msgid ":attr:`%x`"
msgstr ""
# 0fa6698006104615b635b7ca1b435ec2
# 36e333a24d664b2995292c76c7e7eec9
#: ../src/Doc/c-api/string.rst:120 ../src/Doc/c-api/unicode.rst:286
msgid "Exactly equivalent to ``printf(\"%x\")``."
msgstr ""
# 798248e977374f048b8fbfc1f671c383
# e0051a7224d04d0c9e79815ca1509d96
#: ../src/Doc/c-api/string.rst:123 ../src/Doc/c-api/unicode.rst:289
msgid ":attr:`%s`"
msgstr ""
# 75774afc29c74e568026c9e6ee4cb47f
# 86f57649a7574ebbb651a5802af0aff8
#: ../src/Doc/c-api/string.rst:123 ../src/Doc/c-api/unicode.rst:289
msgid "char\\*"
msgstr ""
# 22180cf26b344cbca255a1cd9b730a36
# 1b4840c48e224f2aaa0c8c6a36089eb2
#: ../src/Doc/c-api/string.rst:123 ../src/Doc/c-api/unicode.rst:289
msgid "A null-terminated C character array."
msgstr ""
# 66c27e32e39d49d8b34b7437b4add38b
# 735767b5a0334c2ea3b089fee77b2598
#: ../src/Doc/c-api/string.rst:126 ../src/Doc/c-api/unicode.rst:292
msgid ":attr:`%p`"
msgstr ""
# bf1a96747a374814b7d32e6e53e562c1
# 3ceb780b2bfe4b1085f74f257982c723
#: ../src/Doc/c-api/string.rst:126 ../src/Doc/c-api/unicode.rst:292
msgid "void\\*"
msgstr ""
# bbcdba15b8ef40118b4f626cd1037234
# 8f7dff10a1014aa1bd1abd8f9a6bc09e
#: ../src/Doc/c-api/string.rst:126 ../src/Doc/c-api/unicode.rst:292
msgid ""
"The hex representation of a C pointer. Mostly equivalent to ``printf(\"%p"
"\")`` except that it is guaranteed to start with the literal ``0x`` "
"regardless of what the platform's ``printf`` yields."
msgstr ""
# 172ca83681c6498baed2e23834b6adaf
# c73ecef9d6cf46c8b59934c8a6e56c60
#: ../src/Doc/c-api/string.rst:135 ../src/Doc/c-api/unicode.rst:316
msgid ""
"An unrecognized format character causes all the rest of the format string to "
"be copied as-is to the result string, and any extra arguments discarded."
msgstr ""
# 740d0b5bc0e04942a7d4aea50de13aba
#: ../src/Doc/c-api/string.rst:140
msgid ""
"The `\"%lld\"` and `\"%llu\"` format specifiers are only available when :"
"const:`HAVE_LONG_LONG` is defined."
msgstr ""
# ffd15bac004040709ad9b78b9149082f
#: ../src/Doc/c-api/string.rst:149
msgid ""
"Identical to :c:func:`PyString_FromFormat` except that it takes exactly two "
"arguments."
msgstr ""
# 128fa15c2d6c44bcab793a09f2c1ddf1
#: ../src/Doc/c-api/string.rst:155
msgid "Return the length of the string in string object *string*."
msgstr ""
# 688ba05e28444136b1edca4ff55054fe
#: ../src/Doc/c-api/string.rst:164
msgid "Macro form of :c:func:`PyString_Size` but without error checking."
msgstr ""
# c6dc2ddece474981b55227ddc5164027
#: ../src/Doc/c-api/string.rst:173
msgid ""
"Return a NUL-terminated representation of the contents of *string*. The "
"pointer refers to the internal buffer of *string*, not a copy. The data "
"must not be modified in any way, unless the string was just created using "
"``PyString_FromStringAndSize(NULL, size)``. It must not be deallocated. If "
"*string* is a Unicode object, this function computes the default encoding of "
"*string* and operates on that. If *string* is not a string object at all, :"
"c:func:`PyString_AsString` returns *NULL* and raises :exc:`TypeError`."
msgstr ""
# 3efc7de42b744975a61ecc5495f13936
#: ../src/Doc/c-api/string.rst:184
msgid ""
"Macro form of :c:func:`PyString_AsString` but without error checking. Only "
"string objects are supported; no Unicode objects should be passed."
msgstr ""
# 048c3c4ca85a4ae6ba21b5cdde3feddc
#: ../src/Doc/c-api/string.rst:190
msgid ""
"Return a NUL-terminated representation of the contents of the object *obj* "
"through the output variables *buffer* and *length*."
msgstr ""
# e4e85954040d4512a508660c44766317
#: ../src/Doc/c-api/string.rst:193
msgid ""
"The function accepts both string and Unicode objects as input. For Unicode "
"objects it returns the default encoded version of the object. If *length* "
"is *NULL*, the resulting buffer may not contain NUL characters; if it does, "
"the function returns ``-1`` and a :exc:`TypeError` is raised."
msgstr ""
# 76dda1a5d40742c6988a404442c0ce08
#: ../src/Doc/c-api/string.rst:198
msgid ""
"The buffer refers to an internal string buffer of *obj*, not a copy. The "
"data must not be modified in any way, unless the string was just created "
"using ``PyString_FromStringAndSize(NULL, size)``. It must not be "
"deallocated. If *string* is a Unicode object, this function computes the "
"default encoding of *string* and operates on that. If *string* is not a "
"string object at all, :c:func:`PyString_AsStringAndSize` returns ``-1`` and "
"raises :exc:`TypeError`."
msgstr ""
# 8b9f0d26c5294381b4dc808bce20b014
#: ../src/Doc/c-api/string.rst:212
msgid ""
"Create a new string object in *\\*string* containing the contents of "
"*newpart* appended to *string*; the caller will own the new reference. The "
"reference to the old value of *string* will be stolen. If the new string "
"cannot be created, the old reference to *string* will still be discarded and "
"the value of *\\*string* will be set to *NULL*; the appropriate exception "
"will be set."
msgstr ""
# 82874c28428541bea371df97053d5bc1
#: ../src/Doc/c-api/string.rst:221
msgid ""
"Create a new string object in *\\*string* containing the contents of "
"*newpart* appended to *string*. This version decrements the reference count "
"of *newpart*."
msgstr ""
# 4b418e6c35724c73a60d3401282ee744
#: ../src/Doc/c-api/string.rst:227
msgid ""
"A way to resize a string object even though it is \"immutable\". Only use "
"this to build up a brand new string object; don't use this if the string may "
"already be known in other parts of the code. It is an error to call this "
"function if the refcount on the input string object is not one. Pass the "
"address of an existing string object as an lvalue (it may be written into), "
"and the new size desired. On success, *\\*string* holds the resized string "
"object and ``0`` is returned; the address in *\\*string* may differ from its "
"input value. If the reallocation fails, the original string object at *"
"\\*string* is deallocated, *\\*string* is set to *NULL*, a memory exception "
"is set, and ``-1`` is returned."
msgstr ""
# a29dc753d12a4b4c9362368ea546cbb9
#: ../src/Doc/c-api/string.rst:243
msgid ""
"Return a new string object from *format* and *args*. Analogous to ``format % "
"args``. The *args* argument must be a tuple or dict."
msgstr ""
# caeb83f35b954bac887a7a8b099ce52c
#: ../src/Doc/c-api/string.rst:249
msgid ""
"Intern the argument *\\*string* in place. The argument must be the address "
"of a pointer variable pointing to a Python string object. If there is an "
"existing interned string that is the same as *\\*string*, it sets *"
"\\*string* to it (decrementing the reference count of the old string object "
"and incrementing the reference count of the interned string object), "
"otherwise it leaves *\\*string* alone and interns it (incrementing its "
"reference count). (Clarification: even though there is a lot of talk about "
"reference counts, think of this function as reference-count-neutral; you own "
"the object after the call if and only if you owned it before the call.)"
msgstr ""
# ce316bcccc884555b5ac9a6fcf61673a
# e656e85e58ee4d798565894f89d148d6
# 5864e29c4e0249f691f8c390bc6bf071
# 995e77c2868f4a09ae4ef80738cc351c
# 42c8cf9030e44f21bb03da9d62b4edfc
# 6a982225035944e69ded1636a252d3c0
#: ../src/Doc/c-api/string.rst:261 ../src/Doc/c-api/string.rst:273
#: ../src/Doc/c-api/string.rst:286 ../src/Doc/c-api/string.rst:303
#: ../src/Doc/c-api/string.rst:316 ../src/Doc/c-api/string.rst:333
msgid ""
"This function is not available in 3.x and does not have a PyBytes alias."
msgstr ""
# 79bbff4399f4484389711698f660f83d
#: ../src/Doc/c-api/string.rst:266
msgid ""
"A combination of :c:func:`PyString_FromString` and :c:func:"
"`PyString_InternInPlace`, returning either a new string object that has been "
"interned, or a new (\"owned\") reference to an earlier interned string "
"object with the same value."
msgstr ""
# 5c4a996713f94caf8331887afc59b7b9
#: ../src/Doc/c-api/string.rst:278
msgid ""
"Create an object by decoding *size* bytes of the encoded buffer *s* using "
"the codec registered for *encoding*. *encoding* and *errors* have the same "
"meaning as the parameters of the same name in the :func:`unicode` built-in "
"function. The codec to be used is looked up using the Python codec "
"registry. Return *NULL* if an exception was raised by the codec."
msgstr ""
# 7fc186d37b5943268d2f5bc512baaf25
#: ../src/Doc/c-api/string.rst:295
msgid ""
"Decode a string object by passing it to the codec registered for *encoding* "
"and return the result as Python object. *encoding* and *errors* have the "
"same meaning as the parameters of the same name in the string :meth:`encode` "
"method. The codec to be used is looked up using the Python codec registry. "
"Return *NULL* if an exception was raised by the codec."
msgstr ""
# cab2bc68b35245fcb4b248f1f6bbab9b
#: ../src/Doc/c-api/string.rst:308
msgid ""
"Encode the :c:type:`char` buffer of the given size by passing it to the "
"codec registered for *encoding* and return a Python object. *encoding* and "
"*errors* have the same meaning as the parameters of the same name in the "
"string :meth:`encode` method. The codec to be used is looked up using the "
"Python codec registry. Return *NULL* if an exception was raised by the "
"codec."
msgstr ""
# 124795461f164a3e891727cd34283146
#: ../src/Doc/c-api/string.rst:325
msgid ""
"Encode a string object using the codec registered for *encoding* and return "
"the result as Python object. *encoding* and *errors* have the same meaning "
"as the parameters of the same name in the string :meth:`encode` method. The "
"codec to be used is looked up using the Python codec registry. Return *NULL* "
"if an exception was raised by the codec."
msgstr ""
#: ../src/Doc/c-api/structures.rst:6
msgid "Common Object Structures"
msgstr ""
#: ../src/Doc/c-api/structures.rst:8
msgid ""
"There are a large number of structures which are used in the definition of "
"object types for Python. This section describes these structures and how "
"they are used."
msgstr ""
# 845a82ba036542f5b8cd98a9163a9084
#: ../src/Doc/c-api/structures.rst:12
msgid ""
"All Python objects ultimately share a small number of fields at the "
"beginning of the object's representation in memory. These are represented "
"by the :c:type:`PyObject` and :c:type:`PyVarObject` types, which are "
"defined, in turn, by the expansions of some macros also used, whether "
"directly or indirectly, in the definition of all other Python objects."
msgstr ""
# 9bd89241c8594c7ebf9248eafe6eaef9
#: ../src/Doc/c-api/structures.rst:21
msgid ""
"All object types are extensions of this type. This is a type which contains "
"the information Python needs to treat a pointer to an object as an object. "
"In a normal \"release\" build, it contains only the object's reference count "
"and a pointer to the corresponding type object. It corresponds to the "
"fields defined by the expansion of the ``PyObject_HEAD`` macro."
msgstr ""
# d7f1d4d2192d49d8890d90089020deb5
#: ../src/Doc/c-api/structures.rst:31
msgid ""
"This is an extension of :c:type:`PyObject` that adds the :attr:`ob_size` "
"field. This is only used for objects that have some notion of *length*. "
"This type does not often appear in the Python/C API. It corresponds to the "
"fields defined by the expansion of the ``PyObject_VAR_HEAD`` macro."
msgstr ""
# 9590fd1ba7f24479ab23aaad0ba60173
#: ../src/Doc/c-api/structures.rst:36
msgid ""
"These macros are used in the definition of :c:type:`PyObject` and :c:type:"
"`PyVarObject`:"
msgstr ""
# 88f2232a186e4942a85cb64e7b531206
#: ../src/Doc/c-api/structures.rst:42
msgid ""
"This is a macro which expands to the declarations of the fields of the :c:"
"type:`PyObject` type; it is used when declaring new types which represent "
"objects without a varying length. The specific fields it expands to depend "
"on the definition of :c:macro:`Py_TRACE_REFS`. By default, that macro is "
"not defined, and :c:macro:`PyObject_HEAD` expands to::"
msgstr ""
# b9712fa048f24b7b8b803dd2706599b8
#: ../src/Doc/c-api/structures.rst:51
msgid "When :c:macro:`Py_TRACE_REFS` is defined, it expands to::"
msgstr ""
# ac4bcf4205064856b2f85c49e210c487
#: ../src/Doc/c-api/structures.rst:60
msgid ""
"This is a macro which expands to the declarations of the fields of the :c:"
"type:`PyVarObject` type; it is used when declaring new types which represent "
"objects with a length that varies from instance to instance. This macro "
"always expands to::"
msgstr ""
# 83e9371c05c1488da388da178f943bcf
#: ../src/Doc/c-api/structures.rst:68
msgid ""
"Note that :c:macro:`PyObject_HEAD` is part of the expansion, and that its "
"own expansion varies depending on the definition of :c:macro:`Py_TRACE_REFS`."
msgstr ""
# bb0ccc33d550409190a12ac23d0a178d
#: ../src/Doc/c-api/structures.rst:74
msgid ""
"This is a macro which expands to initialization values for a new :c:type:"
"`PyObject` type. This macro expands to::"
msgstr ""
# e40066f845de44b2b1d76200416af0d9
#: ../src/Doc/c-api/structures.rst:83
msgid ""
"This is a macro which expands to initialization values for a new :c:type:"
"`PyVarObject` type, including the :attr:`ob_size` field. This macro expands "
"to::"
msgstr ""
# 5391de214fac44318343145f5a3e3ceb
#: ../src/Doc/c-api/structures.rst:93
msgid ""
"Type of the functions used to implement most Python callables in C. "
"Functions of this type take two :c:type:`PyObject\\*` parameters and return "
"one such value. If the return value is *NULL*, an exception shall have been "
"set. If not *NULL*, the return value is interpreted as the return value of "
"the function as exposed in Python. The function must return a new reference."
msgstr ""
# 8c94b09ea150435591712b69c9a5bf1f
#: ../src/Doc/c-api/structures.rst:103
msgid ""
"Structure used to describe a method of an extension type. This structure "
"has four fields:"
msgstr ""
# c84d9893aa734db7b932f88f477c42f9
# 7d43d8c80da84d1e84f0e846ca738618
#: ../src/Doc/c-api/structures.rst:107 ../src/Doc/c-api/structures.rst:234
msgid "Field"
msgstr ""
# e05db405917b4f1ca1559fb2ba69042e
# 66cdb5c56a0b42ab8d1366d8001dbf87
#: ../src/Doc/c-api/structures.rst:107 ../src/Doc/c-api/structures.rst:234
msgid "C Type"
msgstr ""
# 3ff274f9cc304312be45136155b1492e
# ed754c1426244a70a16d9a487bb8bc01
#: ../src/Doc/c-api/structures.rst:107 ../src/Doc/c-api/structures.rst:234
msgid "Meaning"
msgstr ""
# 9b16ac7d33324a95b99afe4bd9b92682
#: ../src/Doc/c-api/structures.rst:109
msgid ":attr:`ml_name`"
msgstr ""
# c568b844e7fa46b6b99ec4c1cd6b8614
# 5460bdea356e41c8ad77d16453835020
# 8c33d008c80441cebcf4835031d83a12
# 5a5d5d025cd14696bc96bdfc322c70ce
# 7cbf4c7aa1a64cc6b1229af80e46773c
#: ../src/Doc/c-api/structures.rst:109 ../src/Doc/c-api/structures.rst:117
#: ../src/Doc/c-api/structures.rst:236 ../src/Doc/c-api/structures.rst:249
#: ../src/Doc/c-api/structures.rst:265
msgid "char \\*"
msgstr ""
# 609a2b3e0e554c50b801fd83578306af
#: ../src/Doc/c-api/structures.rst:109
msgid "name of the method"
msgstr ""
# f112f038ec6342299be124a52d6f3548
#: ../src/Doc/c-api/structures.rst:111
msgid ":attr:`ml_meth`"
msgstr ""
#: ../src/Doc/c-api/structures.rst:111
#, fuzzy
msgid "PyCFunction"
msgstr "Fonction de l'API"
# 77f38b75f194492291b8db84597fcee3
#: ../src/Doc/c-api/structures.rst:111
msgid "pointer to the C implementation"
msgstr ""
# 0f3c125b995a4afa8700c6562304a480
#: ../src/Doc/c-api/structures.rst:114
msgid ":attr:`ml_flags`"
msgstr ""
# 9f2dca299925471689667563946c5627
#: ../src/Doc/c-api/structures.rst:114
msgid "flag bits indicating how the call should be constructed"
msgstr ""
# 995be151b9fa4487a60ac41118d69bc1
#: ../src/Doc/c-api/structures.rst:117
msgid ":attr:`ml_doc`"
msgstr ""
# 6e56fb65167d4cfbb2795b596cadc0f5
# ebaf5da23eb94109910a6df70f136b75
#: ../src/Doc/c-api/structures.rst:117 ../src/Doc/c-api/structures.rst:249
msgid "points to the contents of the docstring"
msgstr ""
# 52a4cbe3334d4ef080dfa3b0b6b5b5b8
#: ../src/Doc/c-api/structures.rst:121
msgid ""
"The :attr:`ml_meth` is a C function pointer. The functions may be of "
"different types, but they always return :c:type:`PyObject\\*`. If the "
"function is not of the :c:type:`PyCFunction`, the compiler will require a "
"cast in the method table. Even though :c:type:`PyCFunction` defines the "
"first parameter as :c:type:`PyObject\\*`, it is common that the method "
"implementation uses a the specific C type of the *self* object."
msgstr ""
#: ../src/Doc/c-api/structures.rst:128
msgid ""
"The :attr:`ml_flags` field is a bitfield which can include the following "
"flags. The individual flags indicate either a calling convention or a "
"binding convention. Of the calling convention flags, only :const:"
"`METH_VARARGS` and :const:`METH_KEYWORDS` can be combined (but note that :"
"const:`METH_KEYWORDS` alone is equivalent to ``METH_VARARGS | "
"METH_KEYWORDS``). Any of the calling convention flags can be combined with a "
"binding flag."
msgstr ""
# 4c827964af3142068f8c993e091a0924
#: ../src/Doc/c-api/structures.rst:138
msgid ""
"This is the typical calling convention, where the methods have the type :c:"
"type:`PyCFunction`. The function expects two :c:type:`PyObject\\*` values. "
"The first one is the *self* object for methods; for module functions, it is "
"the module object. The second parameter (often called *args*) is a tuple "
"object representing all arguments. This parameter is typically processed "
"using :c:func:`PyArg_ParseTuple` or :c:func:`PyArg_UnpackTuple`."
msgstr ""
# 0f4229c03b884f3b9dbe8a8a5d0645da
#: ../src/Doc/c-api/structures.rst:148
msgid ""
"Methods with these flags must be of type :c:type:`PyCFunctionWithKeywords`. "
"The function expects three parameters: *self*, *args*, and a dictionary of "
"all the keyword arguments. The flag is typically combined with :const:"
"`METH_VARARGS`, and the parameters are typically processed using :c:func:"
"`PyArg_ParseTupleAndKeywords`."
msgstr ""
# e7887ce1af6f4680a033dcce7213ab2d
#: ../src/Doc/c-api/structures.rst:157
msgid ""
"Methods without parameters don't need to check whether arguments are given "
"if they are listed with the :const:`METH_NOARGS` flag. They need to be of "
"type :c:type:`PyCFunction`. The first parameter is typically named ``self`` "
"and will hold a reference to the module or object instance. In all cases "
"the second parameter will be *NULL*."
msgstr ""
# 0eca0b360900450683885ae002957e21
#: ../src/Doc/c-api/structures.rst:166
msgid ""
"Methods with a single object argument can be listed with the :const:`METH_O` "
"flag, instead of invoking :c:func:`PyArg_ParseTuple` with a ``\"O\"`` "
"argument. They have the type :c:type:`PyCFunction`, with the *self* "
"parameter, and a :c:type:`PyObject\\*` parameter representing the single "
"argument."
msgstr ""
# 06f57996579945fe9e8ee3c070c0a330
#: ../src/Doc/c-api/structures.rst:174
msgid ""
"This calling convention is deprecated. The method must be of type :c:type:"
"`PyCFunction`. The second argument is *NULL* if no arguments are given, a "
"single object if exactly one argument is given, and a tuple of objects if "
"more than one argument is given. There is no way for a function using this "
"convention to distinguish between a call with multiple arguments and a call "
"with a tuple as the only argument."
msgstr ""
#: ../src/Doc/c-api/structures.rst:181
msgid ""
"These two constants are not used to indicate the calling convention but the "
"binding when use with methods of classes. These may not be used for "
"functions defined for modules. At most one of these flags may be set for "
"any given method."
msgstr ""
#: ../src/Doc/c-api/structures.rst:191
msgid ""
"The method will be passed the type object as the first parameter rather than "
"an instance of the type. This is used to create *class methods*, similar to "
"what is created when using the :func:`classmethod` built-in function."
msgstr ""
#: ../src/Doc/c-api/structures.rst:203
msgid ""
"The method will be passed *NULL* as the first parameter rather than an "
"instance of the type. This is used to create *static methods*, similar to "
"what is created when using the :func:`staticmethod` built-in function."
msgstr ""
#: ../src/Doc/c-api/structures.rst:209
msgid ""
"One other constant controls whether a method is loaded in place of another "
"definition with the same method name."
msgstr ""
#: ../src/Doc/c-api/structures.rst:215
msgid ""
"The method will be loaded in place of existing definitions. Without "
"*METH_COEXIST*, the default is to skip repeated definitions. Since slot "
"wrappers are loaded before the method table, the existence of a "
"*sq_contains* slot, for example, would generate a wrapped method named :meth:"
"`__contains__` and preclude the loading of a corresponding PyCFunction with "
"the same name. With the flag defined, the PyCFunction will be loaded in "
"place of the wrapper object and will co-exist with the slot. This is "
"helpful because calls to PyCFunctions are optimized more than wrapper object "
"calls."
msgstr ""
# 62ed1e6aab114693a771dd280cfbc334
#: ../src/Doc/c-api/structures.rst:230
msgid ""
"Structure which describes an attribute of a type which corresponds to a C "
"struct member. Its fields are:"
msgstr ""
# 123f8ddbaaeb4dfe8b79022317b4d806
#: ../src/Doc/c-api/structures.rst:236
msgid ":attr:`name`"
msgstr ""
# f23fea0a306b4eb18076351928c57dc7
#: ../src/Doc/c-api/structures.rst:236
msgid "name of the member"
msgstr ""
# 99f19403324e4795b675b6b1a8ac16f2
#: ../src/Doc/c-api/structures.rst:238
msgid ":attr:`type`"
msgstr ""
# 6d6783702d03422e83c48772499b637a
#: ../src/Doc/c-api/structures.rst:238
msgid "the type of the member in the C struct"
msgstr ""
# a14dda4ecec649bfb8410ccc653ed696
#: ../src/Doc/c-api/structures.rst:241
msgid ":attr:`offset`"
msgstr ""
# 3f68339a200a473fa8bbf09c1c2403f0
#: ../src/Doc/c-api/structures.rst:241
msgid ""
"the offset in bytes that the member is located on the type's object struct"
msgstr ""
# 6d23ce9215664f868e98dc9c0a5ed18f
#: ../src/Doc/c-api/structures.rst:245
msgid ":attr:`flags`"
msgstr ""
# 969d3eb89b0f4f62b7c4811966524f0e
#: ../src/Doc/c-api/structures.rst:245
msgid "flag bits indicating if the field should be read-only or writable"
msgstr ""
# 4e85048710344335b941cda343cef99c
#: ../src/Doc/c-api/structures.rst:249
msgid ":attr:`doc`"
msgstr ""
# 3679d3e6172d48bda64be45cf39b43ec
#: ../src/Doc/c-api/structures.rst:253
msgid ""
":attr:`type` can be one of many ``T_`` macros corresponding to various C "
"types. When the member is accessed in Python, it will be converted to the "
"equivalent Python type."
msgstr ""
#: ../src/Doc/c-api/structures.rst:258
#, fuzzy
msgid "Macro name"
msgstr "Macros"
# c503c8f38dea4fa4bdd8dc96b892ed59
#: ../src/Doc/c-api/structures.rst:258
msgid "C type"
msgstr ""
# 4d5da794d2a14452b97b13acf685e2c0
#: ../src/Doc/c-api/structures.rst:260
msgid "T_SHORT"
msgstr ""
# a08d9d3590424909bca1021a09e124ba
#: ../src/Doc/c-api/structures.rst:260
msgid "short"
msgstr ""
# ddba46bdbf7e42d9a51b896ec4fe753e
#: ../src/Doc/c-api/structures.rst:261
msgid "T_INT"
msgstr ""
# e205b490ea87498faeb5050fb027986e
#: ../src/Doc/c-api/structures.rst:262
msgid "T_LONG"
msgstr ""
# 8215a1da2a804e478437165e4ae75779
#: ../src/Doc/c-api/structures.rst:263
msgid "T_FLOAT"
msgstr ""
# 8ba49158422b4d66b451cafc00685189
#: ../src/Doc/c-api/structures.rst:263
msgid "float"
msgstr ""
# 99ea33de1264436e8f826114940b4d2b
#: ../src/Doc/c-api/structures.rst:264
msgid "T_DOUBLE"
msgstr ""
# 0568555c1291492b9aae95d5da5b8af8
#: ../src/Doc/c-api/structures.rst:264
msgid "double"
msgstr ""
# 05fafd92bbf843a08c7f73f3b8d957f9
#: ../src/Doc/c-api/structures.rst:265
msgid "T_STRING"
msgstr ""
# 9b381b0910774eb88197b3d74a532398
#: ../src/Doc/c-api/structures.rst:266
msgid "T_OBJECT"
msgstr ""
# c8f9601cf49a479d8f04e7e05efb7f07
# ff7499c004e94262a34e4fea69758896
#: ../src/Doc/c-api/structures.rst:266 ../src/Doc/c-api/structures.rst:267
msgid "PyObject \\*"
msgstr ""
# 3da3580f9bcf481296d4e6eefa454b35
#: ../src/Doc/c-api/structures.rst:267
msgid "T_OBJECT_EX"
msgstr ""
# 86c3567917b94745968287419025d668
#: ../src/Doc/c-api/structures.rst:268
msgid "T_CHAR"
msgstr ""
# 081cdc6e199d43418dbcca89007d19c1
# d60b61cc8aed448ebcc8643000ca0140
# d44d8b4e05f245fc9f2563cb48a83d74
#: ../src/Doc/c-api/structures.rst:268 ../src/Doc/c-api/structures.rst:269
#: ../src/Doc/c-api/structures.rst:274
msgid "char"
msgstr ""
# 5117c6cb97334768ba21f245f5340c44
#: ../src/Doc/c-api/structures.rst:269
msgid "T_BYTE"
msgstr ""
# a0a962324491466a8b1bfe1c1882761a
#: ../src/Doc/c-api/structures.rst:270
msgid "T_UBYTE"
msgstr ""
# d3471db97d544d9ab11d01bf8791497d
#: ../src/Doc/c-api/structures.rst:270
msgid "unsigned char"
msgstr ""
# 585e918b892346f0b44277b59684716b
#: ../src/Doc/c-api/structures.rst:271
msgid "T_UINT"
msgstr ""
# 413795b1e8394c4494f1e8657b810c7e
#: ../src/Doc/c-api/structures.rst:272
msgid "T_USHORT"
msgstr ""
# dbe7ad9754ce46cc8aa7704eff60fd50
#: ../src/Doc/c-api/structures.rst:272
msgid "unsigned short"
msgstr ""
# 32ed1771331e4aca8760f268014a86d8
#: ../src/Doc/c-api/structures.rst:273
msgid "T_ULONG"
msgstr ""
# 879b3c752755447cbf3031dfa21662d3
#: ../src/Doc/c-api/structures.rst:274
msgid "T_BOOL"
msgstr ""
# ae914b5557b54dcf9d497661f55ddade
#: ../src/Doc/c-api/structures.rst:275
msgid "T_LONGLONG"
msgstr ""
# f064da1a69fb4470aeb34ce360110fd2
#: ../src/Doc/c-api/structures.rst:276
msgid "T_ULONGLONG"
msgstr ""
# 8719e562ba224575859c9f28d3e7a5ed
#: ../src/Doc/c-api/structures.rst:277
msgid "T_PYSSIZET"
msgstr ""
# 8b5cfcd16007493fabd0cabd84e0ca99
#: ../src/Doc/c-api/structures.rst:280
msgid ""
":c:macro:`T_OBJECT` and :c:macro:`T_OBJECT_EX` differ in that :c:macro:"
"`T_OBJECT` returns ``None`` if the member is *NULL* and :c:macro:"
"`T_OBJECT_EX` raises an :exc:`AttributeError`. Try to use :c:macro:"
"`T_OBJECT_EX` over :c:macro:`T_OBJECT` because :c:macro:`T_OBJECT_EX` "
"handles use of the :keyword:`del` statement on that attribute more correctly "
"than :c:macro:`T_OBJECT`."
msgstr ""
# 30e2b9ecac9e46d9864c672fb1b1e735
#: ../src/Doc/c-api/structures.rst:287
msgid ""
":attr:`flags` can be 0 for write and read access or :c:macro:`READONLY` for "
"read-only access. Using :c:macro:`T_STRING` for :attr:`type` implies :c:"
"macro:`READONLY`. Only :c:macro:`T_OBJECT` and :c:macro:`T_OBJECT_EX` "
"members can be deleted. (They are set to *NULL*)."
msgstr ""
# 84737bc7192247de9060964b3e4dd7af
#: ../src/Doc/c-api/structures.rst:295
msgid ""
"Return a bound method object for an extension type implemented in C. This "
"can be useful in the implementation of a :c:member:`~PyTypeObject."
"tp_getattro` or :c:member:`~PyTypeObject.tp_getattr` handler that does not "
"use the :c:func:`PyObject_GenericGetAttr` function."
msgstr ""
#: ../src/Doc/c-api/sys.rst:6
msgid "Operating System Utilities"
msgstr ""
# e70ffc3ba19d4c0ba1d463e69a8b39d0
#: ../src/Doc/c-api/sys.rst:11
msgid ""
"Return true (nonzero) if the standard I/O file *fp* with name *filename* is "
"deemed interactive. This is the case for files for which "
"``isatty(fileno(fp))`` is true. If the global flag :c:data:"
"`Py_InteractiveFlag` is true, this function also returns true if the "
"*filename* pointer is *NULL* or if the name is equal to one of the strings "
"``'<stdin>'`` or ``'???'``."
msgstr ""
# 073311ebea7c494ab0d76851e1295d29
#: ../src/Doc/c-api/sys.rst:20
msgid ""
"Function to update some internal state after a process fork; this should be "
"called in the new process if the Python interpreter will continue to be "
"used. If a new executable is loaded into the new process, this function does "
"not need to be called."
msgstr ""
# 03520cac340f4a968ab8124b31a78bc3
#: ../src/Doc/c-api/sys.rst:28
msgid ""
"Return true when the interpreter runs out of stack space. This is a "
"reliable check, but is only available when :const:`USE_STACKCHECK` is "
"defined (currently on Windows using the Microsoft Visual C++ compiler). :"
"const:`USE_STACKCHECK` will be defined automatically; you should never "
"change the definition in your own code."
msgstr ""
# d10f93acaff6473f84284b421a213f32
#: ../src/Doc/c-api/sys.rst:37
msgid ""
"Return the current signal handler for signal *i*. This is a thin wrapper "
"around either :c:func:`sigaction` or :c:func:`signal`. Do not call those "
"functions directly! :c:type:`PyOS_sighandler_t` is a typedef alias for :c:"
"type:`void (\\*)(int)`."
msgstr ""
# 081571cd9a524878bd2f8265ae27c019
#: ../src/Doc/c-api/sys.rst:45
msgid ""
"Set the signal handler for signal *i* to be *h*; return the old signal "
"handler. This is a thin wrapper around either :c:func:`sigaction` or :c:func:"
"`signal`. Do not call those functions directly! :c:type:"
"`PyOS_sighandler_t` is a typedef alias for :c:type:`void (\\*)(int)`."
msgstr ""
#: ../src/Doc/c-api/sys.rst:53
msgid "System Functions"
msgstr ""
#: ../src/Doc/c-api/sys.rst:55
msgid ""
"These are utility functions that make functionality from the :mod:`sys` "
"module accessible to C code. They all work with the current interpreter "
"thread's :mod:`sys` module's dict, which is contained in the internal thread "
"state structure."
msgstr ""
# b7b82076857c474cbab6f406c9a4a2b0
#: ../src/Doc/c-api/sys.rst:61
msgid ""
"Return the object *name* from the :mod:`sys` module or *NULL* if it does not "
"exist, without setting an exception."
msgstr ""
# 1ed2eea8ca824bc789dcef1b3504ae0c
#: ../src/Doc/c-api/sys.rst:66
msgid ""
"Return the :c:type:`FILE*` associated with the object *name* in the :mod:"
"`sys` module, or *def* if *name* is not in the module or is not associated "
"with a :c:type:`FILE*`."
msgstr ""
# 05298b4ad4644ed793609f3be94ed2b9
#: ../src/Doc/c-api/sys.rst:72
msgid ""
"Set *name* in the :mod:`sys` module to *v* unless *v* is *NULL*, in which "
"case *name* is deleted from the sys module. Returns ``0`` on success, ``-1`` "
"on error."
msgstr ""
# faa4270c892a41ffafe6b8ef4068890f
#: ../src/Doc/c-api/sys.rst:78
msgid "Reset :data:`sys.warnoptions` to an empty list."
msgstr ""
# 7b632cccd1264a1196a4194a949dadbb
#: ../src/Doc/c-api/sys.rst:82
msgid "Append *s* to :data:`sys.warnoptions`."
msgstr ""
# da46ab77a6bf40548d052c1fda8daa8a
#: ../src/Doc/c-api/sys.rst:86
msgid ""
"Set :data:`sys.path` to a list object of paths found in *path* which should "
"be a list of paths separated with the platform's search path delimiter (``:"
"`` on Unix, ``;`` on Windows)."
msgstr ""
# 8cf1f87eff8246fcb8858b567c184e01
#: ../src/Doc/c-api/sys.rst:92
msgid ""
"Write the output string described by *format* to :data:`sys.stdout`. No "
"exceptions are raised, even if truncation occurs (see below)."
msgstr ""
# 4980162967514a2bac79281d02c244b2
#: ../src/Doc/c-api/sys.rst:95
msgid ""
"*format* should limit the total size of the formatted output string to 1000 "
"bytes or less -- after 1000 bytes, the output string is truncated. In "
"particular, this means that no unrestricted \"%s\" formats should occur; "
"these should be limited using \"%.<N>s\" where <N> is a decimal number "
"calculated so that <N> plus the maximum size of other formatted text does "
"not exceed 1000 bytes. Also watch out for \"%f\", which can print hundreds "
"of digits for very large numbers."
msgstr ""
# f6c78a81f9944966a628708a96beb996
#: ../src/Doc/c-api/sys.rst:103
msgid ""
"If a problem occurs, or :data:`sys.stdout` is unset, the formatted message "
"is written to the real (C level) *stdout*."
msgstr ""
# 50f6041c08784b899490d511e9f0dcc4
#: ../src/Doc/c-api/sys.rst:108
msgid "As above, but write to :data:`sys.stderr` or *stderr* instead."
msgstr ""
#: ../src/Doc/c-api/sys.rst:114
msgid "Process Control"
msgstr ""
# f8a827b5a3444e93ba3cd60575a5b34d
#: ../src/Doc/c-api/sys.rst:121
msgid ""
"Print a fatal error message and kill the process. No cleanup is performed. "
"This function should only be invoked when a condition is detected that would "
"make it dangerous to continue using the Python interpreter; e.g., when the "
"object administration appears to be corrupted. On Unix, the standard C "
"library function :c:func:`abort` is called which will attempt to produce a :"
"file:`core` file."
msgstr ""
# c859d9afdf15437c9f08793a4d940b57
#: ../src/Doc/c-api/sys.rst:135
msgid ""
"Exit the current process. This calls :c:func:`Py_Finalize` and then calls "
"the standard C library function ``exit(status)``."
msgstr ""
# 277771a3c094481db05ff7dcecde54a7
#: ../src/Doc/c-api/sys.rst:145
msgid ""
"Register a cleanup function to be called by :c:func:`Py_Finalize`. The "
"cleanup function will be called with no arguments and should return no "
"value. At most 32 cleanup functions can be registered. When the "
"registration is successful, :c:func:`Py_AtExit` returns ``0``; on failure, "
"it returns ``-1``. The cleanup function registered last is called first. "
"Each cleanup function will be called at most once. Since Python's internal "
"finalization will have completed before the cleanup function, no Python APIs "
"should be called by *func*."
msgstr ""
#: ../src/Doc/c-api/tuple.rst:6
msgid "Tuple Objects"
msgstr ""
# 967ef849d699435c98d0d198bef72913
#: ../src/Doc/c-api/tuple.rst:13
msgid "This subtype of :c:type:`PyObject` represents a Python tuple object."
msgstr ""
# 1189871d8cb34413b0e205cfc668eefb
#: ../src/Doc/c-api/tuple.rst:20
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python tuple type; it "
"is the same object as ``tuple`` and ``types.TupleType`` in the Python layer.."
msgstr ""
# 839ff937c8dc4d959cbf4ce2e12474e2
#: ../src/Doc/c-api/tuple.rst:26
msgid ""
"Return true if *p* is a tuple object or an instance of a subtype of the "
"tuple type."
msgstr ""
# 80c25cdf59d446adb7624727ac406672
#: ../src/Doc/c-api/tuple.rst:35
msgid ""
"Return true if *p* is a tuple object, but not an instance of a subtype of "
"the tuple type."
msgstr ""
# b1b3ebc493d2464687b94b236c5f3bf1
#: ../src/Doc/c-api/tuple.rst:43
msgid "Return a new tuple object of size *len*, or *NULL* on failure."
msgstr ""
# 3e5a776bd9ee4ffb8d1ee2b8a5b23a49
#: ../src/Doc/c-api/tuple.rst:52
msgid ""
"Return a new tuple object of size *n*, or *NULL* on failure. The tuple "
"values are initialized to the subsequent *n* C arguments pointing to Python "
"objects. ``PyTuple_Pack(2, a, b)`` is equivalent to "
"``Py_BuildValue(\"(OO)\", a, b)``."
msgstr ""
# bfb98296769741b882909718d16871cc
#: ../src/Doc/c-api/tuple.rst:65
msgid "Take a pointer to a tuple object, and return the size of that tuple."
msgstr ""
# 01c3092d86e04c3abc73436e1845f4a5
#: ../src/Doc/c-api/tuple.rst:74
msgid ""
"Return the size of the tuple *p*, which must be non-*NULL* and point to a "
"tuple; no error checking is performed."
msgstr ""
# d68c1d70c85744c7883417760f5a921f
#: ../src/Doc/c-api/tuple.rst:84
msgid ""
"Return the object at position *pos* in the tuple pointed to by *p*. If "
"*pos* is out of bounds, return *NULL* and sets an :exc:`IndexError` "
"exception."
msgstr ""
# 673a380c06b44298a19d240e5a57ddea
#: ../src/Doc/c-api/tuple.rst:94
msgid "Like :c:func:`PyTuple_GetItem`, but does no checking of its arguments."
msgstr ""
# 5ca33fe5f7ed4c3c88f1136239b7d515
#: ../src/Doc/c-api/tuple.rst:103
msgid ""
"Take a slice of the tuple pointed to by *p* from *low* to *high* and return "
"it as a new tuple."
msgstr ""
# 2e8a59e43637428e891a722a6b4821ee
#: ../src/Doc/c-api/tuple.rst:113
msgid ""
"Insert a reference to object *o* at position *pos* of the tuple pointed to "
"by *p*. Return ``0`` on success."
msgstr ""
# de131a2db6ee43809d9f581551781c37
# ecf51a54a4b341fc925aac52d7a98428
#: ../src/Doc/c-api/tuple.rst:118 ../src/Doc/c-api/tuple.rst:132
msgid "This function \"steals\" a reference to *o*."
msgstr ""
# 71c72cc2ebcf4bf5b27755a88130a64a
#: ../src/Doc/c-api/tuple.rst:127
msgid ""
"Like :c:func:`PyTuple_SetItem`, but does no error checking, and should "
"*only* be used to fill in brand new tuples."
msgstr ""
# 05394a0b177f45b1b9043b9e41e8f61e
#: ../src/Doc/c-api/tuple.rst:141
msgid ""
"Can be used to resize a tuple. *newsize* will be the new length of the "
"tuple. Because tuples are *supposed* to be immutable, this should only be "
"used if there is only one reference to the object. Do *not* use this if the "
"tuple may already be known to some other part of the code. The tuple will "
"always grow or shrink at the end. Think of this as destroying the old tuple "
"and creating a new one, only more efficiently. Returns ``0`` on success. "
"Client code should never assume that the resulting value of ``*p`` will be "
"the same as before calling this function. If the object referenced by ``*p`` "
"is replaced, the original ``*p`` is destroyed. On failure, returns ``-1`` "
"and sets ``*p`` to *NULL*, and raises :exc:`MemoryError` or :exc:"
"`SystemError`."
msgstr ""
#: ../src/Doc/c-api/type.rst:6 ../src/Doc/c-api/typeobj.rst:6
msgid "Type Objects"
msgstr ""
# b63c653840a9437982faf629aeaaf338
#: ../src/Doc/c-api/type.rst:13
msgid "The C structure of the objects used to describe built-in types."
msgstr ""
# bada912aeec64b8e8b2641868ddd52f6
#: ../src/Doc/c-api/type.rst:20
msgid ""
"This is the type object for type objects; it is the same object as ``type`` "
"and ``types.TypeType`` in the Python layer."
msgstr ""
# c99a3cb8f3194ffdb6c61158a9bccbda
#: ../src/Doc/c-api/type.rst:26
msgid ""
"Return true if the object *o* is a type object, including instances of types "
"derived from the standard type object. Return false in all other cases."
msgstr ""
# 872fb0d25b094028acf9ce122f49b0e7
#: ../src/Doc/c-api/type.rst:32
msgid ""
"Return true if the object *o* is a type object, but not a subtype of the "
"standard type object. Return false in all other cases."
msgstr ""
# 34f5bfeb7b4649809e6b083c47fcf87d
#: ../src/Doc/c-api/type.rst:40
msgid "Clear the internal lookup cache. Return the current version tag."
msgstr ""
# 78a9262d07034884bf9bbb69cb9b8e81
#: ../src/Doc/c-api/type.rst:47
msgid ""
"Invalidate the internal lookup cache for the type and all of its subtypes. "
"This function must be called after any manual modification of the attributes "
"or base classes of the type."
msgstr ""
# 19fa6658707c431681b9e563811e1009
#: ../src/Doc/c-api/type.rst:56
msgid ""
"Return true if the type object *o* sets the feature *feature*. Type "
"features are denoted by single bit flags."
msgstr ""
# 37c5ab5e00cc4bc39c2bd610b65a1090
#: ../src/Doc/c-api/type.rst:62
msgid ""
"Return true if the type object includes support for the cycle detector; this "
"tests the type flag :const:`Py_TPFLAGS_HAVE_GC`."
msgstr ""
# faecd1889cda43c8afb79fb86919f42b
#: ../src/Doc/c-api/type.rst:70
msgid "Return true if *a* is a subtype of *b*."
msgstr ""
# e010249857db442d825dd1a9e5865d77
#: ../src/Doc/c-api/type.rst:74
msgid ""
"This function only checks for actual subtypes, which means that :meth:"
"`~class.__subclasscheck__` is not called on *b*. Call :c:func:"
"`PyObject_IsSubclass` to do the same check that :func:`issubclass` would do."
msgstr ""
# 4b03ec023c3a45b5ac059a73301167e2
#: ../src/Doc/c-api/type.rst:96
msgid ""
"Finalize a type object. This should be called on all type objects to finish "
"their initialization. This function is responsible for adding inherited "
"slots from a type's base class. Return ``0`` on success, or return ``-1`` "
"and sets an exception on error."
msgstr ""
# 8ef6caa9237449438cd208b9287ba987
#: ../src/Doc/c-api/typeobj.rst:8
msgid ""
"Perhaps one of the most important structures of the Python object system is "
"the structure that defines a new type: the :c:type:`PyTypeObject` "
"structure. Type objects can be handled using any of the :c:func:`PyObject_"
"\\*` or :c:func:`PyType_\\*` functions, but do not offer much that's "
"interesting to most Python applications. These objects are fundamental to "
"how objects behave, so they are very important to the interpreter itself and "
"to any extension module that implements new types."
msgstr ""
#: ../src/Doc/c-api/typeobj.rst:16
msgid ""
"Type objects are fairly large compared to most of the standard types. The "
"reason for the size is that each type object stores a large number of "
"values, mostly C function pointers, each of which implements a small part of "
"the type's functionality. The fields of the type object are examined in "
"detail in this section. The fields will be described in the order in which "
"they occur in the structure."
msgstr ""
# 5aadf53c05a74201a5f16b40fdd7c8cb
#: ../src/Doc/c-api/typeobj.rst:23
msgid ""
"Typedefs: unaryfunc, binaryfunc, ternaryfunc, inquiry, coercion, intargfunc, "
"intintargfunc, intobjargproc, intintobjargproc, objobjargproc, destructor, "
"freefunc, printfunc, getattrfunc, getattrofunc, setattrfunc, setattrofunc, "
"cmpfunc, reprfunc, hashfunc"
msgstr ""
# 2e31551d90034fac8e7d21462941b3bf
#: ../src/Doc/c-api/typeobj.rst:28
msgid ""
"The structure definition for :c:type:`PyTypeObject` can be found in :file:"
"`Include/object.h`. For convenience of reference, this repeats the "
"definition found there:"
msgstr ""
# 6c913531d93548a4bf1c7dcd8c4dee1a
#: ../src/Doc/c-api/typeobj.rst:35
msgid ""
"The type object structure extends the :c:type:`PyVarObject` structure. The :"
"attr:`ob_size` field is used for dynamic types (created by :func:"
"`type_new`, usually called from a class statement). Note that :c:data:"
"`PyType_Type` (the metatype) initializes :c:member:`~PyTypeObject."
"tp_itemsize`, which means that its instances (i.e. type objects) *must* have "
"the :attr:`ob_size` field."
msgstr ""
# 2b91ac0c471a43b09359d34116148383
#: ../src/Doc/c-api/typeobj.rst:45
msgid ""
"These fields are only present when the macro ``Py_TRACE_REFS`` is defined. "
"Their initialization to *NULL* is taken care of by the "
"``PyObject_HEAD_INIT`` macro. For statically allocated objects, these "
"fields always remain *NULL*. For dynamically allocated objects, these two "
"fields are used to link the object into a doubly-linked list of *all* live "
"objects on the heap. This could be used for various debugging purposes; "
"currently the only use is to print the objects that are still alive at the "
"end of a run when the environment variable :envvar:`PYTHONDUMPREFS` is set."
msgstr ""
# 74834406cdbd446cb7adb0088ce5dab5
#: ../src/Doc/c-api/typeobj.rst:54
msgid "These fields are not inherited by subtypes."
msgstr ""
# 51ed1cd6c03f4a6ca9cbe22fb16c6d21
#: ../src/Doc/c-api/typeobj.rst:59
msgid ""
"This is the type object's reference count, initialized to ``1`` by the "
"``PyObject_HEAD_INIT`` macro. Note that for statically allocated type "
"objects, the type's instances (objects whose :attr:`ob_type` points back to "
"the type) do *not* count as references. But for dynamically allocated type "
"objects, the instances *do* count as references."
msgstr ""
# 92ff60c53dc548389bd77c33b20ea739
# d1112c855d7b4b39991547cb5f805976
# d34911b0155d44928412116cf3ff5929
#: ../src/Doc/c-api/typeobj.rst:65 ../src/Doc/c-api/typeobj.rst:100
#: ../src/Doc/c-api/typeobj.rst:127
msgid "This field is not inherited by subtypes."
msgstr ""
# 843e03d3cc824d0dbc51a489f80c1420
#: ../src/Doc/c-api/typeobj.rst:74
msgid ""
"This is the type's type, in other words its metatype. It is initialized by "
"the argument to the ``PyObject_HEAD_INIT`` macro, and its value should "
"normally be ``&PyType_Type``. However, for dynamically loadable extension "
"modules that must be usable on Windows (at least), the compiler complains "
"that this is not a valid initializer. Therefore, the convention is to pass "
"*NULL* to the ``PyObject_HEAD_INIT`` macro and to initialize this field "
"explicitly at the start of the module's initialization function, before "
"doing anything else. This is typically done like this::"
msgstr ""
# 30dd1a4d767c4eb19ea4fa9bd190f8b3
#: ../src/Doc/c-api/typeobj.rst:85
msgid ""
"This should be done before any instances of the type are created. :c:func:"
"`PyType_Ready` checks if :attr:`ob_type` is *NULL*, and if so, initializes "
"it: in Python 2.2, it is set to ``&PyType_Type``; in Python 2.2.1 and later "
"it is initialized to the :attr:`ob_type` field of the base class. :c:func:"
"`PyType_Ready` will not change this field if it is non-zero."
msgstr ""
# 3caa97df6788403dbe9a0018d7212cf3
#: ../src/Doc/c-api/typeobj.rst:91
msgid ""
"In Python 2.2, this field is not inherited by subtypes. In 2.2.1, and in "
"2.3 and beyond, it is inherited by subtypes."
msgstr ""
# 5b07f6fa73514f26b7a925d620b887f4
#: ../src/Doc/c-api/typeobj.rst:97
msgid ""
"For statically allocated type objects, this should be initialized to zero. "
"For dynamically allocated type objects, this field has a special internal "
"meaning."
msgstr ""
# 8df9c68390b548afba630c67ff21bd04
#: ../src/Doc/c-api/typeobj.rst:105
msgid ""
"Pointer to a NUL-terminated string containing the name of the type. For "
"types that are accessible as module globals, the string should be the full "
"module name, followed by a dot, followed by the type name; for built-in "
"types, it should be just the type name. If the module is a submodule of a "
"package, the full package name is part of the full module name. For "
"example, a type named :class:`T` defined in module :mod:`M` in subpackage :"
"mod:`Q` in package :mod:`P` should have the :c:member:`~PyTypeObject."
"tp_name` initializer ``\"P.Q.M.T\"``."
msgstr ""
# 820e82f7a0e44f3088f63298409ad428
#: ../src/Doc/c-api/typeobj.rst:113
msgid ""
"For dynamically allocated type objects, this should just be the type name, "
"and the module name explicitly stored in the type dict as the value for key "
"``'__module__'``."
msgstr ""
# 83430549a259424e931b14cb54924e10
#: ../src/Doc/c-api/typeobj.rst:117
msgid ""
"For statically allocated type objects, the tp_name field should contain a "
"dot. Everything before the last dot is made accessible as the :attr:"
"`__module__` attribute, and everything after the last dot is made accessible "
"as the :attr:`__name__` attribute."
msgstr ""
# a3fd6c2d0a814a94b878baa54d3d4706
#: ../src/Doc/c-api/typeobj.rst:122
msgid ""
"If no dot is present, the entire :c:member:`~PyTypeObject.tp_name` field is "
"made accessible as the :attr:`__name__` attribute, and the :attr:"
"`__module__` attribute is undefined (unless explicitly set in the "
"dictionary, as explained above). This means your type will be impossible to "
"pickle."
msgstr ""
# 885c6c4bd127418ca87fadfb399918dd
#: ../src/Doc/c-api/typeobj.rst:133
msgid ""
"These fields allow calculating the size in bytes of instances of the type."
msgstr ""
# 24978f5871884364b4cccb11675953a1
#: ../src/Doc/c-api/typeobj.rst:135
msgid ""
"There are two kinds of types: types with fixed-length instances have a zero :"
"c:member:`~PyTypeObject.tp_itemsize` field, types with variable-length "
"instances have a non-zero :c:member:`~PyTypeObject.tp_itemsize` field. For "
"a type with fixed-length instances, all instances have the same size, given "
"in :c:member:`~PyTypeObject.tp_basicsize`."
msgstr ""
# 2f90d4a58dbf48259414219a8955945c
#: ../src/Doc/c-api/typeobj.rst:140
msgid ""
"For a type with variable-length instances, the instances must have an :attr:"
"`ob_size` field, and the instance size is :c:member:`~PyTypeObject."
"tp_basicsize` plus N times :c:member:`~PyTypeObject.tp_itemsize`, where N is "
"the \"length\" of the object. The value of N is typically stored in the "
"instance's :attr:`ob_size` field. There are exceptions: for example, long "
"ints use a negative :attr:`ob_size` to indicate a negative number, and N is "
"``abs(ob_size)`` there. Also, the presence of an :attr:`ob_size` field in "
"the instance layout doesn't mean that the instance structure is variable-"
"length (for example, the structure for the list type has fixed-length "
"instances, yet those instances have a meaningful :attr:`ob_size` field)."
msgstr ""
# 8eb8f0e4d3f14243b360216b7fd746ff
#: ../src/Doc/c-api/typeobj.rst:151
msgid ""
"The basic size includes the fields in the instance declared by the macro :c:"
"macro:`PyObject_HEAD` or :c:macro:`PyObject_VAR_HEAD` (whichever is used to "
"declare the instance struct) and this in turn includes the :attr:`_ob_prev` "
"and :attr:`_ob_next` fields if they are present. This means that the only "
"correct way to get an initializer for the :c:member:`~PyTypeObject."
"tp_basicsize` is to use the ``sizeof`` operator on the struct used to "
"declare the instance layout. The basic size does not include the GC header "
"size (this is new in Python 2.2; in 2.1 and 2.0, the GC header size was "
"included in :c:member:`~PyTypeObject.tp_basicsize`)."
msgstr ""
# 0a39390337064d218d4e1dbac476decb
#: ../src/Doc/c-api/typeobj.rst:160
msgid ""
"These fields are inherited separately by subtypes. If the base type has a "
"non-zero :c:member:`~PyTypeObject.tp_itemsize`, it is generally not safe to "
"set :c:member:`~PyTypeObject.tp_itemsize` to a different non-zero value in a "
"subtype (though this depends on the implementation of the base type)."
msgstr ""
# 965d91dffe4243dcb7dafbe7b98496e4
#: ../src/Doc/c-api/typeobj.rst:165
msgid ""
"A note about alignment: if the variable items require a particular "
"alignment, this should be taken care of by the value of :c:member:"
"`~PyTypeObject.tp_basicsize`. Example: suppose a type implements an array "
"of ``double``. :c:member:`~PyTypeObject.tp_itemsize` is ``sizeof(double)``. "
"It is the programmer's responsibility that :c:member:`~PyTypeObject."
"tp_basicsize` is a multiple of ``sizeof(double)`` (assuming this is the "
"alignment requirement for ``double``)."
msgstr ""
# 02bbd63629ac43dab5c47d00a8c49ac7
#: ../src/Doc/c-api/typeobj.rst:175
msgid ""
"A pointer to the instance destructor function. This function must be "
"defined unless the type guarantees that its instances will never be "
"deallocated (as is the case for the singletons ``None`` and ``Ellipsis``)."
msgstr ""
# 0ebbc2ebb3644d489db5689759b6eba9
#: ../src/Doc/c-api/typeobj.rst:179
msgid ""
"The destructor function is called by the :c:func:`Py_DECREF` and :c:func:"
"`Py_XDECREF` macros when the new reference count is zero. At this point, "
"the instance is still in existence, but there are no references to it. The "
"destructor function should free all references which the instance owns, free "
"all memory buffers owned by the instance (using the freeing function "
"corresponding to the allocation function used to allocate the buffer), and "
"finally (as its last action) call the type's :c:member:`~PyTypeObject."
"tp_free` function. If the type is not subtypable (doesn't have the :const:"
"`Py_TPFLAGS_BASETYPE` flag bit set), it is permissible to call the object "
"deallocator directly instead of via :c:member:`~PyTypeObject.tp_free`. The "
"object deallocator should be the one used to allocate the instance; this is "
"normally :c:func:`PyObject_Del` if the instance was allocated using :c:func:"
"`PyObject_New` or :c:func:`PyObject_VarNew`, or :c:func:`PyObject_GC_Del` if "
"the instance was allocated using :c:func:`PyObject_GC_New` or :c:func:"
"`PyObject_GC_NewVar`."
msgstr ""
# 67fcbc9460cd42f4ac97148cce8777e2
# 9007a737850245119e0fb16691c1f940
# b06b1a429ce445fea1447a1455e85a3a
# b71fa1515b864fe59fdd9553f7fe5234
# 09842990e0684437a7c6b1d48af2c7e6
# 4ee69a8b848b4a4cb041eb9b979006fb
# 907df49eba474ac89f8e6796fb02e5e2
# adb1384d62e84692b6136c0947ced41a
# 3443b9bd5e704ef2b427de5cc4eddc4b
# d08b4895ac0d4767940704c6a37f97af
#: ../src/Doc/c-api/typeobj.rst:194 ../src/Doc/c-api/typeobj.rst:223
#: ../src/Doc/c-api/typeobj.rst:287 ../src/Doc/c-api/typeobj.rst:355
#: ../src/Doc/c-api/typeobj.rst:373 ../src/Doc/c-api/typeobj.rst:763
#: ../src/Doc/c-api/typeobj.rst:781 ../src/Doc/c-api/typeobj.rst:874
#: ../src/Doc/c-api/typeobj.rst:885 ../src/Doc/c-api/typeobj.rst:970
msgid "This field is inherited by subtypes."
msgstr ""
# a15016a9de3a44cebde1686de01484e7
#: ../src/Doc/c-api/typeobj.rst:199
msgid "An optional pointer to the instance print function."
msgstr ""
# e99eaecb5cd64e1aa223774e1f602c8b
#: ../src/Doc/c-api/typeobj.rst:201
msgid ""
"The print function is only called when the instance is printed to a *real* "
"file; when it is printed to a pseudo-file (like a :class:`~StringIO."
"StringIO` instance), the instance's :c:member:`~PyTypeObject.tp_repr` or :c:"
"member:`~PyTypeObject.tp_str` function is called to convert it to a string. "
"These are also called when the type's :c:member:`~PyTypeObject.tp_print` "
"field is *NULL*. A type should never implement :c:member:`~PyTypeObject."
"tp_print` in a way that produces different output than :c:member:"
"`~PyTypeObject.tp_repr` or :c:member:`~PyTypeObject.tp_str` would."
msgstr ""
# 51962a6e9b87439993381eaca9a1fae3
#: ../src/Doc/c-api/typeobj.rst:208
msgid ""
"The print function is called with the same signature as :c:func:"
"`PyObject_Print`: ``int tp_print(PyObject *self, FILE *file, int flags)``. "
"The *self* argument is the instance to be printed. The *file* argument is "
"the stdio file to which it is to be printed. The *flags* argument is "
"composed of flag bits. The only flag bit currently defined is :const:"
"`Py_PRINT_RAW`. When the :const:`Py_PRINT_RAW` flag bit is set, the instance "
"should be printed the same way as :c:member:`~PyTypeObject.tp_str` would "
"format it; when the :const:`Py_PRINT_RAW` flag bit is clear, the instance "
"should be printed the same was as :c:member:`~PyTypeObject.tp_repr` would "
"format it. It should return ``-1`` and set an exception condition when an "
"error occurred during the comparison."
msgstr ""
# ce7a9d7c08bb4852a41e53828d0777e3
#: ../src/Doc/c-api/typeobj.rst:219
msgid ""
"It is possible that the :c:member:`~PyTypeObject.tp_print` field will be "
"deprecated. In any case, it is recommended not to define :c:member:"
"`~PyTypeObject.tp_print`, but instead to rely on :c:member:`~PyTypeObject."
"tp_repr` and :c:member:`~PyTypeObject.tp_str` for printing."
msgstr ""
# 48a583440e4440fdb17c5d07c6b44804
#: ../src/Doc/c-api/typeobj.rst:228
msgid "An optional pointer to the get-attribute-string function."
msgstr ""
# 3bfbf0b3606e4cab96eca36065d088e0
#: ../src/Doc/c-api/typeobj.rst:230
msgid ""
"This field is deprecated. When it is defined, it should point to a function "
"that acts the same as the :c:member:`~PyTypeObject.tp_getattro` function, "
"but taking a C string instead of a Python string object to give the "
"attribute name. The signature is the same as for :c:func:"
"`PyObject_GetAttrString`."
msgstr ""
# 8879c6a98af84535bdb99563b3d7173b
#: ../src/Doc/c-api/typeobj.rst:235
msgid ""
"This field is inherited by subtypes together with :c:member:`~PyTypeObject."
"tp_getattro`: a subtype inherits both :c:member:`~PyTypeObject.tp_getattr` "
"and :c:member:`~PyTypeObject.tp_getattro` from its base type when the "
"subtype's :c:member:`~PyTypeObject.tp_getattr` and :c:member:`~PyTypeObject."
"tp_getattro` are both *NULL*."
msgstr ""
# e71ee36a0ec14f10bf88a0bff25ceccd
#: ../src/Doc/c-api/typeobj.rst:242
msgid "An optional pointer to the set-attribute-string function."
msgstr ""
# 34894a22c42b4bb4b544828a082e0846
#: ../src/Doc/c-api/typeobj.rst:244
msgid ""
"This field is deprecated. When it is defined, it should point to a function "
"that acts the same as the :c:member:`~PyTypeObject.tp_setattro` function, "
"but taking a C string instead of a Python string object to give the "
"attribute name. The signature is the same as for :c:func:"
"`PyObject_SetAttrString`."
msgstr ""
# 6d818199419a49129c1c7ead3579ac44
#: ../src/Doc/c-api/typeobj.rst:249
msgid ""
"This field is inherited by subtypes together with :c:member:`~PyTypeObject."
"tp_setattro`: a subtype inherits both :c:member:`~PyTypeObject.tp_setattr` "
"and :c:member:`~PyTypeObject.tp_setattro` from its base type when the "
"subtype's :c:member:`~PyTypeObject.tp_setattr` and :c:member:`~PyTypeObject."
"tp_setattro` are both *NULL*."
msgstr ""
# e047d38962b247c1a42460c1d4611dbd
#: ../src/Doc/c-api/typeobj.rst:256
msgid "An optional pointer to the three-way comparison function."
msgstr ""
# 64726039d9e0406b94d03217f657fb16
#: ../src/Doc/c-api/typeobj.rst:258
msgid ""
"The signature is the same as for :c:func:`PyObject_Compare`. The function "
"should return ``1`` if *self* greater than *other*, ``0`` if *self* is equal "
"to *other*, and ``-1`` if *self* less than *other*. It should return ``-1`` "
"and set an exception condition when an error occurred during the comparison."
msgstr ""
# 3caa9f41d6a44952ae011ecef4070c80
#: ../src/Doc/c-api/typeobj.rst:263
msgid ""
"This field is inherited by subtypes together with :c:member:`~PyTypeObject."
"tp_richcompare` and :c:member:`~PyTypeObject.tp_hash`: a subtypes inherits "
"all three of :c:member:`~PyTypeObject.tp_compare`, :c:member:`~PyTypeObject."
"tp_richcompare`, and :c:member:`~PyTypeObject.tp_hash` when the subtype's :c:"
"member:`~PyTypeObject.tp_compare`, :c:member:`~PyTypeObject.tp_richcompare`, "
"and :c:member:`~PyTypeObject.tp_hash` are all *NULL*."
msgstr ""
# ba37fe5e689d491d9b05d88fd4720268
#: ../src/Doc/c-api/typeobj.rst:273
msgid ""
"An optional pointer to a function that implements the built-in function :"
"func:`repr`."
msgstr ""
# 7cf1e76db3794a09990d1b014cbb62f9
#: ../src/Doc/c-api/typeobj.rst:276
msgid ""
"The signature is the same as for :c:func:`PyObject_Repr`; it must return a "
"string or a Unicode object. Ideally, this function should return a string "
"that, when passed to :func:`eval`, given a suitable environment, returns an "
"object with the same value. If this is not feasible, it should return a "
"string starting with ``'<'`` and ending with ``'>'`` from which both the "
"type and the value of the object can be deduced."
msgstr ""
# e1597c03b31a405e8ec83bf186850d7c
#: ../src/Doc/c-api/typeobj.rst:283
msgid ""
"When this field is not set, a string of the form ``<%s object at %p>`` is "
"returned, where ``%s`` is replaced by the type name, and ``%p`` by the "
"object's memory address."
msgstr ""
# cfc096023a8a42f9a570794a7b8d3ba6
#: ../src/Doc/c-api/typeobj.rst:291
msgid ""
"Pointer to an additional structure that contains fields relevant only to "
"objects which implement the number protocol. These fields are documented "
"in :ref:`number-structs`."
msgstr ""
# be0986b0fa6e4c619e003b9f157888f4
#: ../src/Doc/c-api/typeobj.rst:295
msgid ""
"The :c:member:`~PyTypeObject.tp_as_number` field is not inherited, but the "
"contained fields are inherited individually."
msgstr ""
# 8bfe1899a6a446b2b8f4040a2e91fc0e
#: ../src/Doc/c-api/typeobj.rst:301
msgid ""
"Pointer to an additional structure that contains fields relevant only to "
"objects which implement the sequence protocol. These fields are documented "
"in :ref:`sequence-structs`."
msgstr ""
# 9768a000e2d042929fa4ab21b5f6fc24
#: ../src/Doc/c-api/typeobj.rst:305
msgid ""
"The :c:member:`~PyTypeObject.tp_as_sequence` field is not inherited, but the "
"contained fields are inherited individually."
msgstr ""
# 73edcfc48d8c42a7abb072d8b531bd19
#: ../src/Doc/c-api/typeobj.rst:311
msgid ""
"Pointer to an additional structure that contains fields relevant only to "
"objects which implement the mapping protocol. These fields are documented "
"in :ref:`mapping-structs`."
msgstr ""
# c014e4d524c649e6b6a7e24d4dc1bba5
#: ../src/Doc/c-api/typeobj.rst:315
msgid ""
"The :c:member:`~PyTypeObject.tp_as_mapping` field is not inherited, but the "
"contained fields are inherited individually."
msgstr ""
# 0f6e4f5d828a48e0aecbd7a8f78b9770
#: ../src/Doc/c-api/typeobj.rst:323
msgid ""
"An optional pointer to a function that implements the built-in function :"
"func:`hash`."
msgstr ""
# cb02cfcf53314215b00e835a4fc59bec
#: ../src/Doc/c-api/typeobj.rst:326
msgid ""
"The signature is the same as for :c:func:`PyObject_Hash`; it must return a C "
"long. The value ``-1`` should not be returned as a normal return value; "
"when an error occurs during the computation of the hash value, the function "
"should set an exception and return ``-1``."
msgstr ""
# c7eefff3bd574e44b90742173c645bb7
#: ../src/Doc/c-api/typeobj.rst:331
msgid ""
"This field can be set explicitly to :c:func:`PyObject_HashNotImplemented` to "
"block inheritance of the hash method from a parent type. This is interpreted "
"as the equivalent of ``__hash__ = None`` at the Python level, causing "
"``isinstance(o, collections.Hashable)`` to correctly return ``False``. Note "
"that the converse is also true - setting ``__hash__ = None`` on a class at "
"the Python level will result in the ``tp_hash`` slot being set to :c:func:"
"`PyObject_HashNotImplemented`."
msgstr ""
# 24f467d3b8854057afbd313f8e30ad1d
#: ../src/Doc/c-api/typeobj.rst:339
msgid ""
"When this field is not set, two possibilities exist: if the :c:member:"
"`~PyTypeObject.tp_compare` and :c:member:`~PyTypeObject.tp_richcompare` "
"fields are both *NULL*, a default hash value based on the object's address "
"is returned; otherwise, a :exc:`TypeError` is raised."
msgstr ""
# 1053253ea6434055a7d8e8c7d6dd3b6c
#: ../src/Doc/c-api/typeobj.rst:343
msgid ""
"This field is inherited by subtypes together with :c:member:`~PyTypeObject."
"tp_richcompare` and :c:member:`~PyTypeObject.tp_compare`: a subtypes "
"inherits all three of :c:member:`~PyTypeObject.tp_compare`, :c:member:"
"`~PyTypeObject.tp_richcompare`, and :c:member:`~PyTypeObject.tp_hash`, when "
"the subtype's :c:member:`~PyTypeObject.tp_compare`, :c:member:`~PyTypeObject."
"tp_richcompare` and :c:member:`~PyTypeObject.tp_hash` are all *NULL*."
msgstr ""
# 0bb27deb9af04ec28465ebfb2ff7ee1b
#: ../src/Doc/c-api/typeobj.rst:351
msgid ""
"An optional pointer to a function that implements calling the object. This "
"should be *NULL* if the object is not callable. The signature is the same "
"as for :c:func:`PyObject_Call`."
msgstr ""
# 0a19df7917b848ff8405135b1114e574
#: ../src/Doc/c-api/typeobj.rst:360
msgid ""
"An optional pointer to a function that implements the built-in operation :"
"func:`str`. (Note that :class:`str` is a type now, and :func:`str` calls "
"the constructor for that type. This constructor calls :c:func:"
"`PyObject_Str` to do the actual work, and :c:func:`PyObject_Str` will call "
"this handler.)"
msgstr ""
# 7a3307a34d724a4a9494d254ede8f497
#: ../src/Doc/c-api/typeobj.rst:365
msgid ""
"The signature is the same as for :c:func:`PyObject_Str`; it must return a "
"string or a Unicode object. This function should return a \"friendly\" "
"string representation of the object, as this is the representation that will "
"be used by the print statement."
msgstr ""
# 5000052f1e8a45e7bedd18fcab2bf2d8
#: ../src/Doc/c-api/typeobj.rst:370
msgid ""
"When this field is not set, :c:func:`PyObject_Repr` is called to return a "
"string representation."
msgstr ""
# 1277e62d1c214347ae1b5cae9c31c1b5
#: ../src/Doc/c-api/typeobj.rst:378
msgid "An optional pointer to the get-attribute function."
msgstr ""
# 189646e68cc046c8aabcfbcaf88f8a93
#: ../src/Doc/c-api/typeobj.rst:380
msgid ""
"The signature is the same as for :c:func:`PyObject_GetAttr`. It is usually "
"convenient to set this field to :c:func:`PyObject_GenericGetAttr`, which "
"implements the normal way of looking for object attributes."
msgstr ""
# 91a8ba9c29b044e980972a1906db1f36
#: ../src/Doc/c-api/typeobj.rst:384
msgid ""
"This field is inherited by subtypes together with :c:member:`~PyTypeObject."
"tp_getattr`: a subtype inherits both :c:member:`~PyTypeObject.tp_getattr` "
"and :c:member:`~PyTypeObject.tp_getattro` from its base type when the "
"subtype's :c:member:`~PyTypeObject.tp_getattr` and :c:member:`~PyTypeObject."
"tp_getattro` are both *NULL*."
msgstr ""
# 109d3c906b244ebc88e081abc5d2562d
#: ../src/Doc/c-api/typeobj.rst:391
msgid "An optional pointer to the set-attribute function."
msgstr ""
# 00cb094e56b3468692bcf72552529327
#: ../src/Doc/c-api/typeobj.rst:393
msgid ""
"The signature is the same as for :c:func:`PyObject_SetAttr`. It is usually "
"convenient to set this field to :c:func:`PyObject_GenericSetAttr`, which "
"implements the normal way of setting object attributes."
msgstr ""
# 81a1a4605e204d6882d1e0b10a3a78ce
#: ../src/Doc/c-api/typeobj.rst:397
msgid ""
"This field is inherited by subtypes together with :c:member:`~PyTypeObject."
"tp_setattr`: a subtype inherits both :c:member:`~PyTypeObject.tp_setattr` "
"and :c:member:`~PyTypeObject.tp_setattro` from its base type when the "
"subtype's :c:member:`~PyTypeObject.tp_setattr` and :c:member:`~PyTypeObject."
"tp_setattro` are both *NULL*."
msgstr ""
# c0803890d1384ef8a1c1723c6d80d962
#: ../src/Doc/c-api/typeobj.rst:404
msgid ""
"Pointer to an additional structure that contains fields relevant only to "
"objects which implement the buffer interface. These fields are documented "
"in :ref:`buffer-structs`."
msgstr ""
# 83c10dc1c97548bcb5f3a3896101db70
#: ../src/Doc/c-api/typeobj.rst:408
msgid ""
"The :c:member:`~PyTypeObject.tp_as_buffer` field is not inherited, but the "
"contained fields are inherited individually."
msgstr ""
# 256ab99cdd1f4bc2a9f18552e34abe73
#: ../src/Doc/c-api/typeobj.rst:414
msgid ""
"This field is a bit mask of various flags. Some flags indicate variant "
"semantics for certain situations; others are used to indicate that certain "
"fields in the type object (or in the extension structures referenced via :c:"
"member:`~PyTypeObject.tp_as_number`, :c:member:`~PyTypeObject."
"tp_as_sequence`, :c:member:`~PyTypeObject.tp_as_mapping`, and :c:member:"
"`~PyTypeObject.tp_as_buffer`) that were historically not always present are "
"valid; if such a flag bit is clear, the type fields it guards must not be "
"accessed and must be considered to have a zero or *NULL* value instead."
msgstr ""
# 0d7139de9d5b44a2bdcfc685f74c5ecd
#: ../src/Doc/c-api/typeobj.rst:422
msgid ""
"Inheritance of this field is complicated. Most flag bits are inherited "
"individually, i.e. if the base type has a flag bit set, the subtype inherits "
"this flag bit. The flag bits that pertain to extension structures are "
"strictly inherited if the extension structure is inherited, i.e. the base "
"type's value of the flag bit is copied into the subtype together with a "
"pointer to the extension structure. The :const:`Py_TPFLAGS_HAVE_GC` flag "
"bit is inherited together with the :c:member:`~PyTypeObject.tp_traverse` "
"and :c:member:`~PyTypeObject.tp_clear` fields, i.e. if the :const:"
"`Py_TPFLAGS_HAVE_GC` flag bit is clear in the subtype and the :c:member:"
"`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject.tp_clear` fields in "
"the subtype exist (as indicated by the :const:`Py_TPFLAGS_HAVE_RICHCOMPARE` "
"flag bit) and have *NULL* values."
msgstr ""
# b35a98b2704a4b25a2402b5ed1e8d0f5
#: ../src/Doc/c-api/typeobj.rst:434
msgid ""
"The following bit masks are currently defined; these can be ORed together "
"using the ``|`` operator to form the value of the :c:member:`~PyTypeObject."
"tp_flags` field. The macro :c:func:`PyType_HasFeature` takes a type and a "
"flags value, *tp* and *f*, and checks whether ``tp->tp_flags & f`` is non-"
"zero."
msgstr ""
# c5cfd9bae80c4298a2a2cc4e04f4007c
#: ../src/Doc/c-api/typeobj.rst:442
msgid ""
"If this bit is set, the :c:type:`PyBufferProcs` struct referenced by :c:"
"member:`~PyTypeObject.tp_as_buffer` has the :attr:`bf_getcharbuffer` field."
msgstr ""
# 99c9a0513052447d9e7768a94f6dc1e7
#: ../src/Doc/c-api/typeobj.rst:448
msgid ""
"If this bit is set, the :c:type:`PySequenceMethods` struct referenced by :c:"
"member:`~PyTypeObject.tp_as_sequence` has the :attr:`sq_contains` field."
msgstr ""
# e40cab43776942f88b03c3b981c860aa
#: ../src/Doc/c-api/typeobj.rst:454
msgid ""
"This bit is obsolete. The bit it used to name is no longer in use. The "
"symbol is now defined as zero."
msgstr ""
# 39b65657f488479987a9050192df9134
#: ../src/Doc/c-api/typeobj.rst:460
msgid ""
"If this bit is set, the :c:type:`PySequenceMethods` struct referenced by :c:"
"member:`~PyTypeObject.tp_as_sequence` and the :c:type:`PyNumberMethods` "
"structure referenced by :c:member:`~PyTypeObject.tp_as_number` contain the "
"fields for in-place operators. In particular, this means that the :c:type:"
"`PyNumberMethods` structure has the fields :attr:`nb_inplace_add`, :attr:"
"`nb_inplace_subtract`, :attr:`nb_inplace_multiply`, :attr:"
"`nb_inplace_divide`, :attr:`nb_inplace_remainder`, :attr:"
"`nb_inplace_power`, :attr:`nb_inplace_lshift`, :attr:`nb_inplace_rshift`, :"
"attr:`nb_inplace_and`, :attr:`nb_inplace_xor`, and :attr:`nb_inplace_or`; "
"and the :c:type:`PySequenceMethods` struct has the fields :attr:"
"`sq_inplace_concat` and :attr:`sq_inplace_repeat`."
msgstr ""
# 6251e3e4ca7c4dfab63efe6dc63415c6
#: ../src/Doc/c-api/typeobj.rst:475
msgid ""
"If this bit is set, the binary and ternary operations in the :c:type:"
"`PyNumberMethods` structure referenced by :c:member:`~PyTypeObject."
"tp_as_number` accept arguments of arbitrary object types, and do their own "
"type conversions if needed. If this bit is clear, those operations require "
"that all arguments have the current type as their type, and the caller is "
"supposed to perform a coercion operation first. This applies to :attr:"
"`nb_add`, :attr:`nb_subtract`, :attr:`nb_multiply`, :attr:`nb_divide`, :attr:"
"`nb_remainder`, :attr:`nb_divmod`, :attr:`nb_power`, :attr:`nb_lshift`, :"
"attr:`nb_rshift`, :attr:`nb_and`, :attr:`nb_xor`, and :attr:`nb_or`."
msgstr ""
# 07a974351a024241906cf2642ff2dfe5
#: ../src/Doc/c-api/typeobj.rst:488
msgid ""
"If this bit is set, the type object has the :c:member:`~PyTypeObject."
"tp_richcompare` field, as well as the :c:member:`~PyTypeObject.tp_traverse` "
"and the :c:member:`~PyTypeObject.tp_clear` fields."
msgstr ""
# f2eb1011689b488a99895dc6dc9704ae
#: ../src/Doc/c-api/typeobj.rst:494
msgid ""
"If this bit is set, the :c:member:`~PyTypeObject.tp_weaklistoffset` field is "
"defined. Instances of a type are weakly referenceable if the type's :c:"
"member:`~PyTypeObject.tp_weaklistoffset` field has a value greater than zero."
msgstr ""
# 49793033458d47b7ace86e5f5a87a619
#: ../src/Doc/c-api/typeobj.rst:501
msgid ""
"If this bit is set, the type object has the :c:member:`~PyTypeObject."
"tp_iter` and :c:member:`~PyTypeObject.tp_iternext` fields."
msgstr ""
# 689887298e9e4a45ae2e84c45cfe1cf6
#: ../src/Doc/c-api/typeobj.rst:507
msgid ""
"If this bit is set, the type object has several new fields defined starting "
"in Python 2.2: :c:member:`~PyTypeObject.tp_methods`, :c:member:"
"`~PyTypeObject.tp_members`, :c:member:`~PyTypeObject.tp_getset`, :c:member:"
"`~PyTypeObject.tp_base`, :c:member:`~PyTypeObject.tp_dict`, :c:member:"
"`~PyTypeObject.tp_descr_get`, :c:member:`~PyTypeObject.tp_descr_set`, :c:"
"member:`~PyTypeObject.tp_dictoffset`, :c:member:`~PyTypeObject.tp_init`, :c:"
"member:`~PyTypeObject.tp_alloc`, :c:member:`~PyTypeObject.tp_new`, :c:member:"
"`~PyTypeObject.tp_free`, :c:member:`~PyTypeObject.tp_is_gc`, :c:member:"
"`~PyTypeObject.tp_bases`, :c:member:`~PyTypeObject.tp_mro`, :c:member:"
"`~PyTypeObject.tp_cache`, :c:member:`~PyTypeObject.tp_subclasses`, and :c:"
"member:`~PyTypeObject.tp_weaklist`."
msgstr ""
# 45056ddfd61248e4bbfb0cc7faec4d81
#: ../src/Doc/c-api/typeobj.rst:517
msgid ""
"This bit is set when the type object itself is allocated on the heap. In "
"this case, the :attr:`ob_type` field of its instances is considered a "
"reference to the type, and the type object is INCREF'ed when a new instance "
"is created, and DECREF'ed when an instance is destroyed (this does not apply "
"to instances of subtypes; only the type referenced by the instance's ob_type "
"gets INCREF'ed or DECREF'ed)."
msgstr ""
# 629f7cf9c2404690a323eb4234be9980
#: ../src/Doc/c-api/typeobj.rst:527
msgid ""
"This bit is set when the type can be used as the base type of another type. "
"If this bit is clear, the type cannot be subtyped (similar to a \"final\" "
"class in Java)."
msgstr ""
# 1d095d5d681a4ba5b199908eb75aaf8f
#: ../src/Doc/c-api/typeobj.rst:534
msgid ""
"This bit is set when the type object has been fully initialized by :c:func:"
"`PyType_Ready`."
msgstr ""
# 02fe97cd307f4a77abddaa6cade9134c
#: ../src/Doc/c-api/typeobj.rst:540
msgid ""
"This bit is set while :c:func:`PyType_Ready` is in the process of "
"initializing the type object."
msgstr ""
# 19ffa0ac231f41cc807995ab1a5311df
#: ../src/Doc/c-api/typeobj.rst:546
msgid ""
"This bit is set when the object supports garbage collection. If this bit is "
"set, instances must be created using :c:func:`PyObject_GC_New` and destroyed "
"using :c:func:`PyObject_GC_Del`. More information in section :ref:"
"`supporting-cycle-detection`. This bit also implies that the GC-related "
"fields :c:member:`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject."
"tp_clear` are present in the type object; but those fields also exist when :"
"const:`Py_TPFLAGS_HAVE_GC` is clear but :const:`Py_TPFLAGS_HAVE_RICHCOMPARE` "
"is set."
msgstr ""
# 5321bf6cd5df47b9836e5ceca196cfdf
#: ../src/Doc/c-api/typeobj.rst:558
msgid ""
"This is a bitmask of all the bits that pertain to the existence of certain "
"fields in the type object and its extension structures. Currently, it "
"includes the following bits: :const:`Py_TPFLAGS_HAVE_GETCHARBUFFER`, :const:"
"`Py_TPFLAGS_HAVE_SEQUENCE_IN`, :const:`Py_TPFLAGS_HAVE_INPLACEOPS`, :const:"
"`Py_TPFLAGS_HAVE_RICHCOMPARE`, :const:`Py_TPFLAGS_HAVE_WEAKREFS`, :const:"
"`Py_TPFLAGS_HAVE_ITER`, and :const:`Py_TPFLAGS_HAVE_CLASS`."
msgstr ""
# cc63d1f2427b41b3b106be434abca90c
#: ../src/Doc/c-api/typeobj.rst:568
msgid ""
"An optional pointer to a NUL-terminated C string giving the docstring for "
"this type object. This is exposed as the :attr:`__doc__` attribute on the "
"type and instances of the type."
msgstr ""
# a1bc69d1d3c74bfd96632ed5a2776f16
#: ../src/Doc/c-api/typeobj.rst:572
msgid "This field is *not* inherited by subtypes."
msgstr ""
# 6bf3e6b6bc2b44fdb348800d6ac44165
#: ../src/Doc/c-api/typeobj.rst:574
msgid ""
"The following three fields only exist if the :const:"
"`Py_TPFLAGS_HAVE_RICHCOMPARE` flag bit is set."
msgstr ""
# 5849b4e5ae04493188c5b5f4e7f4afc1
#: ../src/Doc/c-api/typeobj.rst:580
msgid ""
"An optional pointer to a traversal function for the garbage collector. This "
"is only used if the :const:`Py_TPFLAGS_HAVE_GC` flag bit is set. More "
"information about Python's garbage collection scheme can be found in "
"section :ref:`supporting-cycle-detection`."
msgstr ""
# e89539d806da4ccfa3e0f3aa08cd868f
#: ../src/Doc/c-api/typeobj.rst:585
msgid ""
"The :c:member:`~PyTypeObject.tp_traverse` pointer is used by the garbage "
"collector to detect reference cycles. A typical implementation of a :c:"
"member:`~PyTypeObject.tp_traverse` function simply calls :c:func:`Py_VISIT` "
"on each of the instance's members that are Python objects. For example, "
"this is function :c:func:`local_traverse` from the :mod:`thread` extension "
"module::"
msgstr ""
# fd9351c5e076415ea47310eb089258d6
#: ../src/Doc/c-api/typeobj.rst:600
msgid ""
"Note that :c:func:`Py_VISIT` is called only on those members that can "
"participate in reference cycles. Although there is also a ``self->key`` "
"member, it can only be *NULL* or a Python string and therefore cannot be "
"part of a reference cycle."
msgstr ""
# 9b992b619cfe405f8cb6173952d0e493
#: ../src/Doc/c-api/typeobj.rst:604
msgid ""
"On the other hand, even if you know a member can never be part of a cycle, "
"as a debugging aid you may want to visit it anyway just so the :mod:`gc` "
"module's :func:`~gc.get_referents` function will include it."
msgstr ""
# 561c167210fd4e2f9c5905a36b22033e
#: ../src/Doc/c-api/typeobj.rst:608
msgid ""
"Note that :c:func:`Py_VISIT` requires the *visit* and *arg* parameters to :c:"
"func:`local_traverse` to have these specific names; don't name them just "
"anything."
msgstr ""
# 0bcd3a3ec3ac4f3bbcb81790581b05d1
#: ../src/Doc/c-api/typeobj.rst:612
msgid ""
"This field is inherited by subtypes together with :c:member:`~PyTypeObject."
"tp_clear` and the :const:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :c:"
"member:`~PyTypeObject.tp_traverse`, and :c:member:`~PyTypeObject.tp_clear` "
"are all inherited from the base type if they are all zero in the subtype "
"*and* the subtype has the :const:`Py_TPFLAGS_HAVE_RICHCOMPARE` flag bit set."
msgstr ""
# 6530210d227344fe8585bb209753cbd0
#: ../src/Doc/c-api/typeobj.rst:621
msgid ""
"An optional pointer to a clear function for the garbage collector. This is "
"only used if the :const:`Py_TPFLAGS_HAVE_GC` flag bit is set."
msgstr ""
# b115349d3e94435e8f293bd142e739de
#: ../src/Doc/c-api/typeobj.rst:624
msgid ""
"The :c:member:`~PyTypeObject.tp_clear` member function is used to break "
"reference cycles in cyclic garbage detected by the garbage collector. Taken "
"together, all :c:member:`~PyTypeObject.tp_clear` functions in the system "
"must combine to break all reference cycles. This is subtle, and if in any "
"doubt supply a :c:member:`~PyTypeObject.tp_clear` function. For example, "
"the tuple type does not implement a :c:member:`~PyTypeObject.tp_clear` "
"function, because it's possible to prove that no reference cycle can be "
"composed entirely of tuples. Therefore the :c:member:`~PyTypeObject."
"tp_clear` functions of other types must be sufficient to break any cycle "
"containing a tuple. This isn't immediately obvious, and there's rarely a "
"good reason to avoid implementing :c:member:`~PyTypeObject.tp_clear`."
msgstr ""
# f4c7f42cb74540d7b0ca31ee168a2ce4
#: ../src/Doc/c-api/typeobj.rst:634
msgid ""
"Implementations of :c:member:`~PyTypeObject.tp_clear` should drop the "
"instance's references to those of its members that may be Python objects, "
"and set its pointers to those members to *NULL*, as in the following "
"example::"
msgstr ""
# a8370cf855eb4268a9df9860eb796416
#: ../src/Doc/c-api/typeobj.rst:648
msgid ""
"The :c:func:`Py_CLEAR` macro should be used, because clearing references is "
"delicate: the reference to the contained object must not be decremented "
"until after the pointer to the contained object is set to *NULL*. This is "
"because decrementing the reference count may cause the contained object to "
"become trash, triggering a chain of reclamation activity that may include "
"invoking arbitrary Python code (due to finalizers, or weakref callbacks, "
"associated with the contained object). If it's possible for such code to "
"reference *self* again, it's important that the pointer to the contained "
"object be *NULL* at that time, so that *self* knows the contained object can "
"no longer be used. The :c:func:`Py_CLEAR` macro performs the operations in "
"a safe order."
msgstr ""
# 4fabca3e05cf4d33a37e7b1d2f980de0
#: ../src/Doc/c-api/typeobj.rst:659
msgid ""
"Because the goal of :c:member:`~PyTypeObject.tp_clear` functions is to break "
"reference cycles, it's not necessary to clear contained objects like Python "
"strings or Python integers, which can't participate in reference cycles. On "
"the other hand, it may be convenient to clear all contained Python objects, "
"and write the type's :c:member:`~PyTypeObject.tp_dealloc` function to "
"invoke :c:member:`~PyTypeObject.tp_clear`."
msgstr ""
# 0b3b77ef1b3745298dc0d5968dfdaa8c
#: ../src/Doc/c-api/typeobj.rst:665
msgid ""
"More information about Python's garbage collection scheme can be found in "
"section :ref:`supporting-cycle-detection`."
msgstr ""
# d3b3a00c07fe47fa82d1e2c84f200837
#: ../src/Doc/c-api/typeobj.rst:668
msgid ""
"This field is inherited by subtypes together with :c:member:`~PyTypeObject."
"tp_traverse` and the :const:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :c:"
"member:`~PyTypeObject.tp_traverse`, and :c:member:`~PyTypeObject.tp_clear` "
"are all inherited from the base type if they are all zero in the subtype "
"*and* the subtype has the :const:`Py_TPFLAGS_HAVE_RICHCOMPARE` flag bit set."
msgstr ""
# 3b3d3245044647beb74ff1b66a8fa3c2
#: ../src/Doc/c-api/typeobj.rst:677
msgid ""
"An optional pointer to the rich comparison function, whose signature is "
"``PyObject *tp_richcompare(PyObject *a, PyObject *b, int op)``."
msgstr ""
# 4dd58f84f2904faaa102a13e18bbe7d1
#: ../src/Doc/c-api/typeobj.rst:680
msgid ""
"The function should return the result of the comparison (usually ``Py_True`` "
"or ``Py_False``). If the comparison is undefined, it must return "
"``Py_NotImplemented``, if another error occurred it must return ``NULL`` and "
"set an exception condition."
msgstr ""
# 7dccaf6da4724bbcad9b7ab52fc4981a
#: ../src/Doc/c-api/typeobj.rst:687
msgid ""
"If you want to implement a type for which only a limited set of comparisons "
"makes sense (e.g. ``==`` and ``!=``, but not ``<`` and friends), directly "
"raise :exc:`TypeError` in the rich comparison function."
msgstr ""
# 909c0c70f933444db985f93842c38b80
#: ../src/Doc/c-api/typeobj.rst:691
msgid ""
"This field is inherited by subtypes together with :c:member:`~PyTypeObject."
"tp_compare` and :c:member:`~PyTypeObject.tp_hash`: a subtype inherits all "
"three of :c:member:`~PyTypeObject.tp_compare`, :c:member:`~PyTypeObject."
"tp_richcompare`, and :c:member:`~PyTypeObject.tp_hash`, when the subtype's :"
"c:member:`~PyTypeObject.tp_compare`, :c:member:`~PyTypeObject."
"tp_richcompare`, and :c:member:`~PyTypeObject.tp_hash` are all *NULL*."
msgstr ""
# 8f3d39dbb67b4c47ae55b89cf2b86786
#: ../src/Doc/c-api/typeobj.rst:696
msgid ""
"The following constants are defined to be used as the third argument for :c:"
"member:`~PyTypeObject.tp_richcompare` and for :c:func:`PyObject_RichCompare`:"
msgstr ""
# 57b0a40115b54597b579794bc4db77af
#: ../src/Doc/c-api/typeobj.rst:700
msgid "Constant"
msgstr ""
# 2c0fe65bb94e4166b102fe073c95c0b9
#: ../src/Doc/c-api/typeobj.rst:700
msgid "Comparison"
msgstr ""
# 4712ea9ba79146faa6ae157775374ea2
#: ../src/Doc/c-api/typeobj.rst:702
msgid ":const:`Py_LT`"
msgstr ""
# abcc0836829b4540a39f768ee21e518c
#: ../src/Doc/c-api/typeobj.rst:702
msgid "``<``"
msgstr ""
# c350da04d3e24a6a867c5c428fcc9aa1
#: ../src/Doc/c-api/typeobj.rst:704
msgid ":const:`Py_LE`"
msgstr ""
# e3f06ccce9a2408b8d0b5d2eac0ae21c
#: ../src/Doc/c-api/typeobj.rst:704
msgid "``<=``"
msgstr ""
# c07654aa3c3d4090bf2004468f7c7582
#: ../src/Doc/c-api/typeobj.rst:706
msgid ":const:`Py_EQ`"
msgstr ""
# f12683b069c04743817cf886ac43fd71
#: ../src/Doc/c-api/typeobj.rst:706
msgid "``==``"
msgstr ""
# 51233278d64b4653b8a032d7189d58ee
#: ../src/Doc/c-api/typeobj.rst:708
msgid ":const:`Py_NE`"
msgstr ""
# 6ad622f885cb4d928f3a529c03564ef4
#: ../src/Doc/c-api/typeobj.rst:708
msgid "``!=``"
msgstr ""
# 6aea469b6cff4529ae00f5b89f9d1c61
#: ../src/Doc/c-api/typeobj.rst:710
msgid ":const:`Py_GT`"
msgstr ""
# 8eb256e476944a16af4121c7b690e75a
#: ../src/Doc/c-api/typeobj.rst:710
msgid "``>``"
msgstr ""
# 3793c1ee41c54446a53994a9f08e2b0f
#: ../src/Doc/c-api/typeobj.rst:712
msgid ":const:`Py_GE`"
msgstr ""
# 74e3b65a92c649aebc1346ed887396a6
#: ../src/Doc/c-api/typeobj.rst:712
msgid "``>=``"
msgstr ""
# 2bd6e83a75cb4797b868d6cbf3b709f1
#: ../src/Doc/c-api/typeobj.rst:716
msgid ""
"The next field only exists if the :const:`Py_TPFLAGS_HAVE_WEAKREFS` flag bit "
"is set."
msgstr ""
# 0481d1b56c1e4206b7ed735567dcf6c9
#: ../src/Doc/c-api/typeobj.rst:721
msgid ""
"If the instances of this type are weakly referenceable, this field is "
"greater than zero and contains the offset in the instance structure of the "
"weak reference list head (ignoring the GC header, if present); this offset "
"is used by :c:func:`PyObject_ClearWeakRefs` and the :c:func:`PyWeakref_\\*` "
"functions. The instance structure needs to include a field of type :c:type:"
"`PyObject\\*` which is initialized to *NULL*."
msgstr ""
# dc33a14bd8e94879a20781199f16f58d
#: ../src/Doc/c-api/typeobj.rst:728
msgid ""
"Do not confuse this field with :c:member:`~PyTypeObject.tp_weaklist`; that "
"is the list head for weak references to the type object itself."
msgstr ""
# a01f93cb6c0146429335f524f8f5eff0
#: ../src/Doc/c-api/typeobj.rst:731
msgid ""
"This field is inherited by subtypes, but see the rules listed below. A "
"subtype may override this offset; this means that the subtype uses a "
"different weak reference list head than the base type. Since the list head "
"is always found via :c:member:`~PyTypeObject.tp_weaklistoffset`, this should "
"not be a problem."
msgstr ""
# d35b812b6951476e9bdd6730d6ac59b1
#: ../src/Doc/c-api/typeobj.rst:736
msgid ""
"When a type defined by a class statement has no :attr:`~object.__slots__` "
"declaration, and none of its base types are weakly referenceable, the type "
"is made weakly referenceable by adding a weak reference list head slot to "
"the instance layout and setting the :c:member:`~PyTypeObject."
"tp_weaklistoffset` of that slot's offset."
msgstr ""
# fdfb7aff7bfb4a59b7b2fc9f97b1eec9
#: ../src/Doc/c-api/typeobj.rst:741
msgid ""
"When a type's :attr:`__slots__` declaration contains a slot named :attr:"
"`__weakref__`, that slot becomes the weak reference list head for instances "
"of the type, and the slot's offset is stored in the type's :c:member:"
"`~PyTypeObject.tp_weaklistoffset`."
msgstr ""
# be6c48d60af647529b7afd9d5539a696
#: ../src/Doc/c-api/typeobj.rst:746
msgid ""
"When a type's :attr:`__slots__` declaration does not contain a slot named :"
"attr:`__weakref__`, the type inherits its :c:member:`~PyTypeObject."
"tp_weaklistoffset` from its base type."
msgstr ""
# 2033ed52b2ad462f84091e1f2052e2e9
#: ../src/Doc/c-api/typeobj.rst:750
msgid ""
"The next two fields only exist if the :const:`Py_TPFLAGS_HAVE_ITER` flag bit "
"is set."
msgstr ""
# 3a18486036f0407c9dff25e2a8d58087
#: ../src/Doc/c-api/typeobj.rst:756
msgid ""
"An optional pointer to a function that returns an iterator for the object. "
"Its presence normally signals that the instances of this type are iterable "
"(although sequences may be iterable without this function, and classic "
"instances always have this function, even if they don't define an :meth:"
"`__iter__` method)."
msgstr ""
# 2980ed305e514fbd9a4b81bd0db0b36d
#: ../src/Doc/c-api/typeobj.rst:761
msgid "This function has the same signature as :c:func:`PyObject_GetIter`."
msgstr ""
# df2b58da41a04e78918cd77e2e027325
#: ../src/Doc/c-api/typeobj.rst:768
msgid ""
"An optional pointer to a function that returns the next item in an iterator. "
"When the iterator is exhausted, it must return *NULL*; a :exc:"
"`StopIteration` exception may or may not be set. When another error occurs, "
"it must return *NULL* too. Its presence normally signals that the instances "
"of this type are iterators (although classic instances always have this "
"function, even if they don't define a :meth:`~iterator.next` method)."
msgstr ""
# 3c9264470fdf47bc87e1af23cc727957
#: ../src/Doc/c-api/typeobj.rst:775
msgid ""
"Iterator types should also define the :c:member:`~PyTypeObject.tp_iter` "
"function, and that function should return the iterator instance itself (not "
"a new iterator instance)."
msgstr ""
# f07dcfa8c1154cbf9637c205a1cb8239
#: ../src/Doc/c-api/typeobj.rst:779
msgid "This function has the same signature as :c:func:`PyIter_Next`."
msgstr ""
# e3ce13245ed74f7297b733ed9259043c
#: ../src/Doc/c-api/typeobj.rst:783
msgid ""
"The next fields, up to and including :c:member:`~PyTypeObject.tp_weaklist`, "
"only exist if the :const:`Py_TPFLAGS_HAVE_CLASS` flag bit is set."
msgstr ""
# 8974ec691d594ff396493c9095b495a9
#: ../src/Doc/c-api/typeobj.rst:789
msgid ""
"An optional pointer to a static *NULL*-terminated array of :c:type:"
"`PyMethodDef` structures, declaring regular methods of this type."
msgstr ""
# ea49a1edf1ed4e1c9b33211265eb18c2
#: ../src/Doc/c-api/typeobj.rst:792
msgid ""
"For each entry in the array, an entry is added to the type's dictionary "
"(see :c:member:`~PyTypeObject.tp_dict` below) containing a method descriptor."
msgstr ""
# 8f0f0315e8f04a3494d2789d603b9051
#: ../src/Doc/c-api/typeobj.rst:795
msgid ""
"This field is not inherited by subtypes (methods are inherited through a "
"different mechanism)."
msgstr ""
# f69ccf279ead4f4cbe80d05d19e51085
#: ../src/Doc/c-api/typeobj.rst:801
msgid ""
"An optional pointer to a static *NULL*-terminated array of :c:type:"
"`PyMemberDef` structures, declaring regular data members (fields or slots) "
"of instances of this type."
msgstr ""
# 3bcf6bc19eb345f6b60e94885f3b8629
#: ../src/Doc/c-api/typeobj.rst:805
msgid ""
"For each entry in the array, an entry is added to the type's dictionary "
"(see :c:member:`~PyTypeObject.tp_dict` below) containing a member descriptor."
msgstr ""
# 9e3e6a0fea094e8ca123bb9ce807e942
#: ../src/Doc/c-api/typeobj.rst:808
msgid ""
"This field is not inherited by subtypes (members are inherited through a "
"different mechanism)."
msgstr ""
# fde6e3d629484966a7ed387791fdb6fb
#: ../src/Doc/c-api/typeobj.rst:814
msgid ""
"An optional pointer to a static *NULL*-terminated array of :c:type:"
"`PyGetSetDef` structures, declaring computed attributes of instances of this "
"type."
msgstr ""
# 2f6b201782774df1be2ae638861b3692
#: ../src/Doc/c-api/typeobj.rst:817
msgid ""
"For each entry in the array, an entry is added to the type's dictionary "
"(see :c:member:`~PyTypeObject.tp_dict` below) containing a getset descriptor."
msgstr ""
# 9c9c9687536f4c77901eea8f2d2a7a5d
#: ../src/Doc/c-api/typeobj.rst:820
msgid ""
"This field is not inherited by subtypes (computed attributes are inherited "
"through a different mechanism)."
msgstr ""
# 610b7558500a4da4ae2f9f0b92bcb13c
#: ../src/Doc/c-api/typeobj.rst:825
msgid "Docs for PyGetSetDef::"
msgstr ""
# 052445d84b354679964ee781aede56b3
#: ../src/Doc/c-api/typeobj.rst:841
msgid ""
"An optional pointer to a base type from which type properties are "
"inherited. At this level, only single inheritance is supported; multiple "
"inheritance require dynamically creating a type object by calling the "
"metatype."
msgstr ""
# 5b12f8a1bfe645b3baeeb2dc5b910d1f
#: ../src/Doc/c-api/typeobj.rst:845
msgid ""
"This field is not inherited by subtypes (obviously), but it defaults to "
"``&PyBaseObject_Type`` (which to Python programmers is known as the type :"
"class:`object`)."
msgstr ""
# 8badb0c6e74b4df6810a848daf90f4d4
#: ../src/Doc/c-api/typeobj.rst:852
msgid "The type's dictionary is stored here by :c:func:`PyType_Ready`."
msgstr ""
# 60a8a19a408043d3ad11432279defc4b
#: ../src/Doc/c-api/typeobj.rst:854
msgid ""
"This field should normally be initialized to *NULL* before PyType_Ready is "
"called; it may also be initialized to a dictionary containing initial "
"attributes for the type. Once :c:func:`PyType_Ready` has initialized the "
"type, extra attributes for the type may be added to this dictionary only if "
"they don't correspond to overloaded operations (like :meth:`__add__`)."
msgstr ""
# cd6c00ef55ce4ef1922af41c5d2ff32f
#: ../src/Doc/c-api/typeobj.rst:860
msgid ""
"This field is not inherited by subtypes (though the attributes defined in "
"here are inherited through a different mechanism)."
msgstr ""
# cdc1bc9ea2fc4f3db6254d840e7ac141
#: ../src/Doc/c-api/typeobj.rst:866
msgid "An optional pointer to a \"descriptor get\" function."
msgstr ""
# 92d07d93bed14e00a7c50c670601735b
# ee328aec34eb43eca5944d31fc466bd1
# 3eec9c124d114788b8038580bbea3371
# 8a77fd89c80348e2a8f5b74f364ace0b
# f4d2e341d8714985b4ddc281f00f1c77
#: ../src/Doc/c-api/typeobj.rst:868 ../src/Doc/c-api/typeobj.rst:881
#: ../src/Doc/c-api/typeobj.rst:952 ../src/Doc/c-api/typeobj.rst:977
#: ../src/Doc/c-api/typeobj.rst:1008
msgid "The function signature is ::"
msgstr ""
# 8aacd667ba7149028aea764a2c23ca7b
#: ../src/Doc/c-api/typeobj.rst:879
msgid "An optional pointer to a \"descriptor set\" function."
msgstr ""
# d496181096b0456a9f10e409cc5e7904
#: ../src/Doc/c-api/typeobj.rst:892
msgid ""
"If the instances of this type have a dictionary containing instance "
"variables, this field is non-zero and contains the offset in the instances "
"of the type of the instance variable dictionary; this offset is used by :c:"
"func:`PyObject_GenericGetAttr`."
msgstr ""
# 5dacb3ea301d4732b59fb76377007023
#: ../src/Doc/c-api/typeobj.rst:897
msgid ""
"Do not confuse this field with :c:member:`~PyTypeObject.tp_dict`; that is "
"the dictionary for attributes of the type object itself."
msgstr ""
# 006a8d4013504ade8d5cb6bc13490190
#: ../src/Doc/c-api/typeobj.rst:900
msgid ""
"If the value of this field is greater than zero, it specifies the offset "
"from the start of the instance structure. If the value is less than zero, "
"it specifies the offset from the *end* of the instance structure. A "
"negative offset is more expensive to use, and should only be used when the "
"instance structure contains a variable-length part. This is used for "
"example to add an instance variable dictionary to subtypes of :class:`str` "
"or :class:`tuple`. Note that the :c:member:`~PyTypeObject.tp_basicsize` "
"field should account for the dictionary added to the end in that case, even "
"though the dictionary is not included in the basic object layout. On a "
"system with a pointer size of 4 bytes, :c:member:`~PyTypeObject."
"tp_dictoffset` should be set to ``-4`` to indicate that the dictionary is at "
"the very end of the structure."
msgstr ""
# 9832d68943774028af1645dcdf86c3a9
#: ../src/Doc/c-api/typeobj.rst:912
msgid ""
"The real dictionary offset in an instance can be computed from a negative :c:"
"member:`~PyTypeObject.tp_dictoffset` as follows::"
msgstr ""
# 2c1f7ce025954a6883e126e91c229c67
#: ../src/Doc/c-api/typeobj.rst:919
msgid ""
"where :c:member:`~PyTypeObject.tp_basicsize`, :c:member:`~PyTypeObject."
"tp_itemsize` and :c:member:`~PyTypeObject.tp_dictoffset` are taken from the "
"type object, and :attr:`ob_size` is taken from the instance. The absolute "
"value is taken because long ints use the sign of :attr:`ob_size` to store "
"the sign of the number. (There's never a need to do this calculation "
"yourself; it is done for you by :c:func:`_PyObject_GetDictPtr`.)"
msgstr ""
# 3b963fce8f9741a6888d1bc117b0dfa1
#: ../src/Doc/c-api/typeobj.rst:925
msgid ""
"This field is inherited by subtypes, but see the rules listed below. A "
"subtype may override this offset; this means that the subtype instances "
"store the dictionary at a difference offset than the base type. Since the "
"dictionary is always found via :c:member:`~PyTypeObject.tp_dictoffset`, this "
"should not be a problem."
msgstr ""
# c0ec7b04561d4bada30103c391d8750e
#: ../src/Doc/c-api/typeobj.rst:930
msgid ""
"When a type defined by a class statement has no :attr:`~object.__slots__` "
"declaration, and none of its base types has an instance variable dictionary, "
"a dictionary slot is added to the instance layout and the :c:member:"
"`~PyTypeObject.tp_dictoffset` is set to that slot's offset."
msgstr ""
# c1db668077d648df9c3eddc994c33038
#: ../src/Doc/c-api/typeobj.rst:935
msgid ""
"When a type defined by a class statement has a :attr:`__slots__` "
"declaration, the type inherits its :c:member:`~PyTypeObject.tp_dictoffset` "
"from its base type."
msgstr ""
# 6c084aca2bb14be285599b898dae2d4e
#: ../src/Doc/c-api/typeobj.rst:938
msgid ""
"(Adding a slot named :attr:`~object.__dict__` to the :attr:`__slots__` "
"declaration does not have the expected effect, it just causes confusion. "
"Maybe this should be added as a feature just like :attr:`__weakref__` "
"though.)"
msgstr ""
# 2761425bf2af4ac8aeb75c2cbcfa485f
#: ../src/Doc/c-api/typeobj.rst:945
msgid "An optional pointer to an instance initialization function."
msgstr ""
# f4999a9bd24b46ab98e7ec937baa0dad
#: ../src/Doc/c-api/typeobj.rst:947
msgid ""
"This function corresponds to the :meth:`__init__` method of classes. Like :"
"meth:`__init__`, it is possible to create an instance without calling :meth:"
"`__init__`, and it is possible to reinitialize an instance by calling its :"
"meth:`__init__` method again."
msgstr ""
# a22181d8a056495b908472546baaa749
#: ../src/Doc/c-api/typeobj.rst:956
msgid ""
"The self argument is the instance to be initialized; the *args* and *kwds* "
"arguments represent positional and keyword arguments of the call to :meth:"
"`__init__`."
msgstr ""
# 87e8f18be13845d39ab17f9498c80d5c
#: ../src/Doc/c-api/typeobj.rst:960
msgid ""
"The :c:member:`~PyTypeObject.tp_init` function, if not *NULL*, is called "
"when an instance is created normally by calling its type, after the type's :"
"c:member:`~PyTypeObject.tp_new` function has returned an instance of the "
"type. If the :c:member:`~PyTypeObject.tp_new` function returns an instance "
"of some other type that is not a subtype of the original type, no :c:member:"
"`~PyTypeObject.tp_init` function is called; if :c:member:`~PyTypeObject."
"tp_new` returns an instance of a subtype of the original type, the "
"subtype's :c:member:`~PyTypeObject.tp_init` is called. (VERSION NOTE: "
"described here is what is implemented in Python 2.2.1 and later. In Python "
"2.2, the :c:member:`~PyTypeObject.tp_init` of the type of the object "
"returned by :c:member:`~PyTypeObject.tp_new` was always called, if not "
"*NULL*.)"
msgstr ""
# 4e6510a97335400db10a55608bbbf5a7
#: ../src/Doc/c-api/typeobj.rst:975
msgid "An optional pointer to an instance allocation function."
msgstr ""
# be924b4baa1e4bad83348b8b809f4d6e
#: ../src/Doc/c-api/typeobj.rst:981
msgid ""
"The purpose of this function is to separate memory allocation from memory "
"initialization. It should return a pointer to a block of memory of adequate "
"length for the instance, suitably aligned, and initialized to zeros, but "
"with :attr:`ob_refcnt` set to ``1`` and :attr:`ob_type` set to the type "
"argument. If the type's :c:member:`~PyTypeObject.tp_itemsize` is non-zero, "
"the object's :attr:`ob_size` field should be initialized to *nitems* and the "
"length of the allocated memory block should be ``tp_basicsize + "
"nitems*tp_itemsize``, rounded up to a multiple of ``sizeof(void*)``; "
"otherwise, *nitems* is not used and the length of the block should be :c:"
"member:`~PyTypeObject.tp_basicsize`."
msgstr ""
# 476b0e93f24549bfa50dc47594b741a1
#: ../src/Doc/c-api/typeobj.rst:991
msgid ""
"Do not use this function to do any other instance initialization, not even "
"to allocate additional memory; that should be done by :c:member:"
"`~PyTypeObject.tp_new`."
msgstr ""
# f4ad5ddcdd894f87b446e0406c225500
#: ../src/Doc/c-api/typeobj.rst:994
msgid ""
"This field is inherited by static subtypes, but not by dynamic subtypes "
"(subtypes created by a class statement); in the latter, this field is always "
"set to :c:func:`PyType_GenericAlloc`, to force a standard heap allocation "
"strategy. That is also the recommended value for statically defined types."
msgstr ""
# d0fa7232c3f9400fbae5777ab34d3b6f
#: ../src/Doc/c-api/typeobj.rst:1002
msgid "An optional pointer to an instance creation function."
msgstr ""
# 016b980237794d77b5a983505c3da395
#: ../src/Doc/c-api/typeobj.rst:1004
msgid ""
"If this function is *NULL* for a particular type, that type cannot be called "
"to create new instances; presumably there is some other way to create "
"instances, like a factory function."
msgstr ""
# 78f55096b4ff4ae1a1e720c4feb54441
#: ../src/Doc/c-api/typeobj.rst:1012
msgid ""
"The subtype argument is the type of the object being created; the *args* and "
"*kwds* arguments represent positional and keyword arguments of the call to "
"the type. Note that subtype doesn't have to equal the type whose :c:member:"
"`~PyTypeObject.tp_new` function is called; it may be a subtype of that type "
"(but not an unrelated type)."
msgstr ""
# b8ac377a43b746b3b91972a85496c9fb
#: ../src/Doc/c-api/typeobj.rst:1018
msgid ""
"The :c:member:`~PyTypeObject.tp_new` function should call ``subtype-"
">tp_alloc(subtype, nitems)`` to allocate space for the object, and then do "
"only as much further initialization as is absolutely necessary. "
"Initialization that can safely be ignored or repeated should be placed in "
"the :c:member:`~PyTypeObject.tp_init` handler. A good rule of thumb is that "
"for immutable types, all initialization should take place in :c:member:"
"`~PyTypeObject.tp_new`, while for mutable types, most initialization should "
"be deferred to :c:member:`~PyTypeObject.tp_init`."
msgstr ""
# 7b346010c14a4606b5bf1505208af791
#: ../src/Doc/c-api/typeobj.rst:1026
msgid ""
"This field is inherited by subtypes, except it is not inherited by static "
"types whose :c:member:`~PyTypeObject.tp_base` is *NULL* or "
"``&PyBaseObject_Type``. The latter exception is a precaution so that old "
"extension types don't become callable simply by being linked with Python 2.2."
msgstr ""
# 0b797f1b56494800bafd7ac1f0c0e4c3
#: ../src/Doc/c-api/typeobj.rst:1034
msgid "An optional pointer to an instance deallocation function."
msgstr ""
# fbae1f1370664d8590eb6df96c52e97e
#: ../src/Doc/c-api/typeobj.rst:1036
msgid ""
"The signature of this function has changed slightly: in Python 2.2 and "
"2.2.1, its signature is :c:type:`destructor`::"
msgstr ""
# 6b6023bafe4b44bda8763176017dcdba
#: ../src/Doc/c-api/typeobj.rst:1041
msgid "In Python 2.3 and beyond, its signature is :c:type:`freefunc`::"
msgstr ""
# 08bc459e1e2546d3ad597b9bb240267d
#: ../src/Doc/c-api/typeobj.rst:1045
msgid ""
"The only initializer that is compatible with both versions is "
"``_PyObject_Del``, whose definition has suitably adapted in Python 2.3."
msgstr ""
# a61764c02fcd4d66b67f21c222178ebc
#: ../src/Doc/c-api/typeobj.rst:1048
msgid ""
"This field is inherited by static subtypes, but not by dynamic subtypes "
"(subtypes created by a class statement); in the latter, this field is set to "
"a deallocator suitable to match :c:func:`PyType_GenericAlloc` and the value "
"of the :const:`Py_TPFLAGS_HAVE_GC` flag bit."
msgstr ""
# 4df3fcb3ff0f47609a6c8ac8e8ff443f
#: ../src/Doc/c-api/typeobj.rst:1056
msgid "An optional pointer to a function called by the garbage collector."
msgstr ""
# 26f5c86e27d042ee9cbd6c80b411dc77
#: ../src/Doc/c-api/typeobj.rst:1058
msgid ""
"The garbage collector needs to know whether a particular object is "
"collectible or not. Normally, it is sufficient to look at the object's "
"type's :c:member:`~PyTypeObject.tp_flags` field, and check the :const:"
"`Py_TPFLAGS_HAVE_GC` flag bit. But some types have a mixture of statically "
"and dynamically allocated instances, and the statically allocated instances "
"are not collectible. Such types should define this function; it should "
"return ``1`` for a collectible instance, and ``0`` for a non-collectible "
"instance. The signature is ::"
msgstr ""
# 4e39715a59fe4b74a7fe35a94675ad09
#: ../src/Doc/c-api/typeobj.rst:1068
msgid ""
"(The only example of this are types themselves. The metatype, :c:data:"
"`PyType_Type`, defines this function to distinguish between statically and "
"dynamically allocated types.)"
msgstr ""
# 9ddba28fa10c4ce497cae5a30bf965d3
#: ../src/Doc/c-api/typeobj.rst:1072
msgid ""
"This field is inherited by subtypes. (VERSION NOTE: in Python 2.2, it was "
"not inherited. It is inherited in 2.2.1 and later versions.)"
msgstr ""
# 0cbe45ca61af4beea3bb6f479fd09976
#: ../src/Doc/c-api/typeobj.rst:1078
msgid "Tuple of base types."
msgstr ""
# 4ce487206f544b95a7891180f98adf8d
#: ../src/Doc/c-api/typeobj.rst:1080
msgid ""
"This is set for types created by a class statement. It should be *NULL* for "
"statically defined types."
msgstr ""
# 59ead1b7bb95445f99c170ea8e932742
#: ../src/Doc/c-api/typeobj.rst:1083
msgid "This field is not inherited."
msgstr ""
# 22cf966af90e469bab21f863b53a37e1
#: ../src/Doc/c-api/typeobj.rst:1088
msgid ""
"Tuple containing the expanded set of base types, starting with the type "
"itself and ending with :class:`object`, in Method Resolution Order."
msgstr ""
# b0424ca7088541bda605bafffec75719
#: ../src/Doc/c-api/typeobj.rst:1091
msgid ""
"This field is not inherited; it is calculated fresh by :c:func:"
"`PyType_Ready`."
msgstr ""
# 540fc036c8964825ad92fae18c6d0a42
#: ../src/Doc/c-api/typeobj.rst:1096
msgid "Unused. Not inherited. Internal use only."
msgstr ""
# 3f03d391a3934e3e900400661bc9bf7d
#: ../src/Doc/c-api/typeobj.rst:1101
msgid ""
"List of weak references to subclasses. Not inherited. Internal use only."
msgstr ""
# 038461ba14994bc38750d4dc6749ee49
#: ../src/Doc/c-api/typeobj.rst:1106
msgid ""
"Weak reference list head, for weak references to this type object. Not "
"inherited. Internal use only."
msgstr ""
#: ../src/Doc/c-api/typeobj.rst:1109
msgid ""
"The remaining fields are only defined if the feature test macro :const:"
"`COUNT_ALLOCS` is defined, and are for internal use only. They are "
"documented here for completeness. None of these fields are inherited by "
"subtypes."
msgstr ""
# 49aa0c7db6484bd695e2cf15bdac896a
#: ../src/Doc/c-api/typeobj.rst:1117
msgid "Number of allocations."
msgstr ""
#: ../src/Doc/c-api/typeobj.rst:1122
#, fuzzy
msgid "Number of frees."
msgstr "Nombres"
# d0b9ac20c0024b53a85b78ea356e9335
#: ../src/Doc/c-api/typeobj.rst:1127
msgid "Maximum simultaneously allocated objects."
msgstr ""
# 2a9e3210e268460f992738dc5cc0dc22
#: ../src/Doc/c-api/typeobj.rst:1132
msgid ""
"Pointer to the next type object with a non-zero :c:member:`~PyTypeObject."
"tp_allocs` field."
msgstr ""
#: ../src/Doc/c-api/typeobj.rst:1134
msgid ""
"Also, note that, in a garbage collected Python, tp_dealloc may be called "
"from any Python thread, not just the thread which created the object (if the "
"object becomes part of a refcount cycle, that cycle might be collected by a "
"garbage collection on any thread). This is not a problem for Python API "
"calls, since the thread on which tp_dealloc is called will own the Global "
"Interpreter Lock (GIL). However, if the object being destroyed in turn "
"destroys objects from some other C or C++ library, care should be taken to "
"ensure that destroying those objects on the thread which called tp_dealloc "
"will not violate any assumptions of the library."
msgstr ""
#: ../src/Doc/c-api/typeobj.rst:1148
msgid "Number Object Structures"
msgstr ""
# a6abce5638744ab78ec85dc1bcaa0cfc
#: ../src/Doc/c-api/typeobj.rst:1155
msgid ""
"This structure holds pointers to the functions which an object uses to "
"implement the number protocol. Almost every function below is used by the "
"function of similar name documented in the :ref:`number` section."
msgstr ""
# b2a0c41b4e574802b764687d59b965a1
#: ../src/Doc/c-api/typeobj.rst:1159
msgid "Here is the structure definition::"
msgstr ""
# 77227e8fbd024bef96dd98d8e936c5b5
#: ../src/Doc/c-api/typeobj.rst:1210
msgid ""
"Binary and ternary functions may receive different kinds of arguments, "
"depending on the flag bit :const:`Py_TPFLAGS_CHECKTYPES`:"
msgstr ""
# 32be086c4eaa455ab5fa60c9409f715a
#: ../src/Doc/c-api/typeobj.rst:1213
msgid ""
"If :const:`Py_TPFLAGS_CHECKTYPES` is not set, the function arguments are "
"guaranteed to be of the object's type; the caller is responsible for calling "
"the coercion method specified by the :attr:`nb_coerce` member to convert the "
"arguments:"
msgstr ""
# 08b2c11a280a40cc82e0a5fa57526ca4
#: ../src/Doc/c-api/typeobj.rst:1220
msgid ""
"This function is used by :c:func:`PyNumber_CoerceEx` and has the same "
"signature. The first argument is always a pointer to an object of the "
"defined type. If the conversion to a common \"larger\" type is possible, "
"the function replaces the pointers with new references to the converted "
"objects and returns ``0``. If the conversion is not possible, the function "
"returns ``1``. If an error condition is set, it will return ``-1``."
msgstr ""
# e345d24adbbb456e8c6e3868c3abd43b
#: ../src/Doc/c-api/typeobj.rst:1227
msgid ""
"If the :const:`Py_TPFLAGS_CHECKTYPES` flag is set, binary and ternary "
"functions must check the type of all their operands, and implement the "
"necessary conversions (at least one of the operands is an instance of the "
"defined type). This is the recommended way; with Python 3 coercion will "
"disappear completely."
msgstr ""
# 04b7b75fe56748d2a7cac93820e3762a
#: ../src/Doc/c-api/typeobj.rst:1233
msgid ""
"If the operation is not defined for the given operands, binary and ternary "
"functions must return ``Py_NotImplemented``, if another error occurred they "
"must return ``NULL`` and set an exception."
msgstr ""
#: ../src/Doc/c-api/typeobj.rst:1241
msgid "Mapping Object Structures"
msgstr ""
# cd4d2aaecfcb421cb977b132639e97e6
#: ../src/Doc/c-api/typeobj.rst:1248
msgid ""
"This structure holds pointers to the functions which an object uses to "
"implement the mapping protocol. It has three members:"
msgstr ""
# 15a5f7abc844431c8e0d8a7a0ebac4cc
#: ../src/Doc/c-api/typeobj.rst:1253
msgid ""
"This function is used by :c:func:`PyMapping_Length` and :c:func:"
"`PyObject_Size`, and has the same signature. This slot may be set to *NULL* "
"if the object has no defined length."
msgstr ""
# d0641356772243afa0748d42d3419b0f
#: ../src/Doc/c-api/typeobj.rst:1259
msgid ""
"This function is used by :c:func:`PyObject_GetItem` and has the same "
"signature. This slot must be filled for the :c:func:`PyMapping_Check` "
"function to return ``1``, it can be *NULL* otherwise."
msgstr ""
# 58fe9d72fb0948f39ac7519bead414b3
#: ../src/Doc/c-api/typeobj.rst:1265
msgid ""
"This function is used by :c:func:`PyObject_SetItem` and has the same "
"signature. If this slot is *NULL*, the object does not support item "
"assignment."
msgstr ""
#: ../src/Doc/c-api/typeobj.rst:1273
msgid "Sequence Object Structures"
msgstr ""
# 82be5849b8464b3e8eeceb51017e4820
#: ../src/Doc/c-api/typeobj.rst:1280
msgid ""
"This structure holds pointers to the functions which an object uses to "
"implement the sequence protocol."
msgstr ""
# 354f9128501b4bf2835ed290f229068d
#: ../src/Doc/c-api/typeobj.rst:1285
msgid ""
"This function is used by :c:func:`PySequence_Size` and :c:func:"
"`PyObject_Size`, and has the same signature."
msgstr ""
# 10cdd99f08b240c7ac49852037b492c6
#: ../src/Doc/c-api/typeobj.rst:1290
msgid ""
"This function is used by :c:func:`PySequence_Concat` and has the same "
"signature. It is also used by the ``+`` operator, after trying the numeric "
"addition via the :c:member:`~PyTypeObject.tp_as_number.nb_add` slot."
msgstr ""
# fd8b060d5df34c47a4a97acf759c7f6d
#: ../src/Doc/c-api/typeobj.rst:1296
msgid ""
"This function is used by :c:func:`PySequence_Repeat` and has the same "
"signature. It is also used by the ``*`` operator, after trying numeric "
"multiplication via the :c:member:`~PyTypeObject.tp_as_number.nb_multiply` "
"slot."
msgstr ""
# d006104ebadb47b89bb930aca716c43e
#: ../src/Doc/c-api/typeobj.rst:1303
msgid ""
"This function is used by :c:func:`PySequence_GetItem` and has the same "
"signature. This slot must be filled for the :c:func:`PySequence_Check` "
"function to return ``1``, it can be *NULL* otherwise."
msgstr ""
# 60a2dd7b2f764e4b98c1a152bd240de8
#: ../src/Doc/c-api/typeobj.rst:1307
msgid ""
"Negative indexes are handled as follows: if the :attr:`sq_length` slot is "
"filled, it is called and the sequence length is used to compute a positive "
"index which is passed to :attr:`sq_item`. If :attr:`sq_length` is *NULL*, "
"the index is passed as is to the function."
msgstr ""
# 479b2f978f484c5bac2f1c796a7d07cd
#: ../src/Doc/c-api/typeobj.rst:1314
msgid ""
"This function is used by :c:func:`PySequence_SetItem` and has the same "
"signature. This slot may be left to *NULL* if the object does not support "
"item assignment."
msgstr ""
# b735c44dc3bb4d979788aa8a8b7d8eff
#: ../src/Doc/c-api/typeobj.rst:1320
msgid ""
"This function may be used by :c:func:`PySequence_Contains` and has the same "
"signature. This slot may be left to *NULL*, in this case :c:func:"
"`PySequence_Contains` simply traverses the sequence until it finds a match."
msgstr ""
# e3ae6b1436cf4672a247ea6102d4f052
#: ../src/Doc/c-api/typeobj.rst:1327
msgid ""
"This function is used by :c:func:`PySequence_InPlaceConcat` and has the same "
"signature. It should modify its first operand, and return it."
msgstr ""
# b9263946d151403a98dbc88b3226198d
#: ../src/Doc/c-api/typeobj.rst:1332
msgid ""
"This function is used by :c:func:`PySequence_InPlaceRepeat` and has the same "
"signature. It should modify its first operand, and return it."
msgstr ""
#: ../src/Doc/c-api/typeobj.rst:1342
msgid "Buffer Object Structures"
msgstr ""
# 018c6a81a0b64e1cacf56dfcb450d764
#: ../src/Doc/c-api/typeobj.rst:1347
msgid ""
"The buffer interface exports a model where an object can expose its internal "
"data as a set of chunks of data, where each chunk is specified as a pointer/"
"length pair. These chunks are called :dfn:`segments` and are presumed to be "
"non-contiguous in memory."
msgstr ""
# d38acbfb91a4439c9afb4d1c429ad6a7
#: ../src/Doc/c-api/typeobj.rst:1352
msgid ""
"If an object does not export the buffer interface, then its :c:member:"
"`~PyTypeObject.tp_as_buffer` member in the :c:type:`PyTypeObject` structure "
"should be *NULL*. Otherwise, the :c:member:`~PyTypeObject.tp_as_buffer` "
"will point to a :c:type:`PyBufferProcs` structure."
msgstr ""
# 4a7a955088294682af36fafeaf902457
#: ../src/Doc/c-api/typeobj.rst:1358
msgid ""
"It is very important that your :c:type:`PyTypeObject` structure uses :const:"
"`Py_TPFLAGS_DEFAULT` for the value of the :c:member:`~PyTypeObject.tp_flags` "
"member rather than ``0``. This tells the Python runtime that your :c:type:"
"`PyBufferProcs` structure contains the :attr:`bf_getcharbuffer` slot. Older "
"versions of Python did not have this member, so a new Python interpreter "
"using an old extension needs to be able to test for its presence before "
"using it."
msgstr ""
# 671ce8453a204c60abe634933c17f1ab
#: ../src/Doc/c-api/typeobj.rst:1368
msgid ""
"Structure used to hold the function pointers which define an implementation "
"of the buffer protocol."
msgstr ""
# 6255e02c907e4011bada70cdea40b1c1
#: ../src/Doc/c-api/typeobj.rst:1371
msgid ""
"The first slot is :attr:`bf_getreadbuffer`, of type :c:type:"
"`getreadbufferproc`. If this slot is *NULL*, then the object does not "
"support reading from the internal data. This is non-sensical, so "
"implementors should fill this in, but callers should test that the slot "
"contains a non-*NULL* value."
msgstr ""
# 77ed07828db14e608f59fac4ee8eb180
#: ../src/Doc/c-api/typeobj.rst:1376
msgid ""
"The next slot is :attr:`bf_getwritebuffer` having type :c:type:"
"`getwritebufferproc`. This slot may be *NULL* if the object does not allow "
"writing into its returned buffers."
msgstr ""
# 2b1d079f5e024e40b8a8b8a6ab444bcd
#: ../src/Doc/c-api/typeobj.rst:1380
msgid ""
"The third slot is :attr:`bf_getsegcount`, with type :c:type:"
"`getsegcountproc`. This slot must not be *NULL* and is used to inform the "
"caller how many segments the object contains. Simple objects such as :c:"
"type:`PyString_Type` and :c:type:`PyBuffer_Type` objects contain a single "
"segment."
msgstr ""
# 8794eca3e0064cf7ae81e22176c471f8
#: ../src/Doc/c-api/typeobj.rst:1387
msgid ""
"The last slot is :attr:`bf_getcharbuffer`, of type :c:type:"
"`getcharbufferproc`. This slot will only be present if the :const:"
"`Py_TPFLAGS_HAVE_GETCHARBUFFER` flag is present in the :c:member:"
"`~PyTypeObject.tp_flags` field of the object's :c:type:`PyTypeObject`. "
"Before using this slot, the caller should test whether it is present by "
"using the :c:func:`PyType_HasFeature` function. If the flag is present, :"
"attr:`bf_getcharbuffer` may be *NULL*, indicating that the object's contents "
"cannot be used as *8-bit characters*. The slot function may also raise an "
"error if the object's contents cannot be interpreted as 8-bit characters. "
"For example, if the object is an array which is configured to hold floating "
"point values, an exception may be raised if a caller attempts to use :attr:"
"`bf_getcharbuffer` to fetch a sequence of 8-bit characters. This notion of "
"exporting the internal buffers as \"text\" is used to distinguish between "
"objects that are binary in nature, and those which have character-based "
"content."
msgstr ""
# 4907e90a96384b3994474fff78dbc2c9
#: ../src/Doc/c-api/typeobj.rst:1403
msgid ""
"The current policy seems to state that these characters may be multi-byte "
"characters. This implies that a buffer size of *N* does not mean there are "
"*N* characters present."
msgstr ""
# 9d058a1e83144869a868f7abd46ec1e6
#: ../src/Doc/c-api/typeobj.rst:1410
msgid ""
"Flag bit set in the type structure to indicate that the :attr:"
"`bf_getcharbuffer` slot is known. This being set does not indicate that the "
"object supports the buffer interface or that the :attr:`bf_getcharbuffer` "
"slot is non-*NULL*."
msgstr ""
# 4d760c4c58184b4e8e44e5292908bc44
#: ../src/Doc/c-api/typeobj.rst:1417
msgid ""
"Return a pointer to a readable segment of the buffer in ``*ptrptr``. This "
"function is allowed to raise an exception, in which case it must return "
"``-1``. The *segment* which is specified must be zero or positive, and "
"strictly less than the number of segments returned by the :attr:"
"`bf_getsegcount` slot function. On success, it returns the length of the "
"segment, and sets ``*ptrptr`` to a pointer to that memory."
msgstr ""
# 55402f93a81d4562b692916f49616255
#: ../src/Doc/c-api/typeobj.rst:1427
msgid ""
"Return a pointer to a writable memory buffer in ``*ptrptr``, and the length "
"of that segment as the function return value. The memory buffer must "
"correspond to buffer segment *segment*. Must return ``-1`` and set an "
"exception on error. :exc:`TypeError` should be raised if the object only "
"supports read-only buffers, and :exc:`SystemError` should be raised when "
"*segment* specifies a segment that doesn't exist."
msgstr ""
# 67e94400d9954cf8af568088001d5f83
#: ../src/Doc/c-api/typeobj.rst:1441
msgid ""
"Return the number of memory segments which comprise the buffer. If *lenp* "
"is not *NULL*, the implementation must report the sum of the sizes (in "
"bytes) of all segments in ``*lenp``. The function cannot fail."
msgstr ""
# c5bdd37aeb9d48cc9bee21477d2ae458
#: ../src/Doc/c-api/typeobj.rst:1448
msgid ""
"Return the size of the segment *segment* that *ptrptr* is set to. "
"``*ptrptr`` is set to the memory buffer. Returns ``-1`` on error."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:6
msgid "Unicode Objects and Codecs"
msgstr ""
#: ../src/Doc/c-api/unicode.rst:11
msgid "Unicode Objects"
msgstr ""
#: ../src/Doc/c-api/unicode.rst:15
msgid "Unicode Type"
msgstr ""
#: ../src/Doc/c-api/unicode.rst:17
msgid ""
"These are the basic Unicode object types used for the Unicode implementation "
"in Python:"
msgstr ""
# 3fca9a5ed85d4d60b535351e1728f058
#: ../src/Doc/c-api/unicode.rst:23
msgid ""
"This type represents the storage type which is used by Python internally as "
"basis for holding Unicode ordinals. Python's default builds use a 16-bit "
"type for :c:type:`Py_UNICODE` and store Unicode values internally as UCS2. "
"It is also possible to build a UCS4 version of Python (most recent Linux "
"distributions come with UCS4 builds of Python). These builds then use a 32-"
"bit type for :c:type:`Py_UNICODE` and store Unicode data internally as UCS4. "
"On platforms where :c:type:`wchar_t` is available and compatible with the "
"chosen Python Unicode build variant, :c:type:`Py_UNICODE` is a typedef alias "
"for :c:type:`wchar_t` to enhance native platform compatibility. On all other "
"platforms, :c:type:`Py_UNICODE` is a typedef alias for either :c:type:"
"`unsigned short` (UCS2) or :c:type:`unsigned long` (UCS4)."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:35
msgid ""
"Note that UCS2 and UCS4 Python builds are not binary compatible. Please keep "
"this in mind when writing extensions or interfaces."
msgstr ""
# 1f89395cefa34536abc2f2612136a10d
#: ../src/Doc/c-api/unicode.rst:41
msgid "This subtype of :c:type:`PyObject` represents a Python Unicode object."
msgstr ""
# d1e72628c7af4373a399fc7918a029a4
#: ../src/Doc/c-api/unicode.rst:46
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python Unicode type. "
"It is exposed to Python code as ``unicode`` and ``types.UnicodeType``."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:49
msgid ""
"The following APIs are really C macros and can be used to do fast checks and "
"to access internal read-only data of Unicode objects:"
msgstr ""
# b6b7663b1ebf470191d37cdec59ae733
#: ../src/Doc/c-api/unicode.rst:55
msgid ""
"Return true if the object *o* is a Unicode object or an instance of a "
"Unicode subtype."
msgstr ""
# cfd334a67c014f8f8c733f22287e86b6
#: ../src/Doc/c-api/unicode.rst:64
msgid ""
"Return true if the object *o* is a Unicode object, but not an instance of a "
"subtype."
msgstr ""
# de1b1a1867234cbdbfdd852206282feb
#: ../src/Doc/c-api/unicode.rst:72
msgid ""
"Return the size of the object. *o* has to be a :c:type:`PyUnicodeObject` "
"(not checked)."
msgstr ""
# d83f0c37c78c4b66b3ad298828508169
#: ../src/Doc/c-api/unicode.rst:82
msgid ""
"Return the size of the object's internal buffer in bytes. *o* has to be a :"
"c:type:`PyUnicodeObject` (not checked)."
msgstr ""
# d1083ef70a564e32ac432404e68c9512
#: ../src/Doc/c-api/unicode.rst:92
msgid ""
"Return a pointer to the internal :c:type:`Py_UNICODE` buffer of the object. "
"*o* has to be a :c:type:`PyUnicodeObject` (not checked)."
msgstr ""
# be6c198522b248c0ae82933a28fa150d
#: ../src/Doc/c-api/unicode.rst:98
msgid ""
"Return a pointer to the internal buffer of the object. *o* has to be a :c:"
"type:`PyUnicodeObject` (not checked)."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:110
msgid "Unicode Character Properties"
msgstr ""
#: ../src/Doc/c-api/unicode.rst:112
msgid ""
"Unicode provides many different character properties. The most often needed "
"ones are available through these macros which are mapped to C functions "
"depending on the Python configuration."
msgstr ""
# 9fa491147ddb45ec8cfb6fe3827cca21
#: ../src/Doc/c-api/unicode.rst:119
msgid "Return 1 or 0 depending on whether *ch* is a whitespace character."
msgstr ""
# eae642fd03404d17ac118cfeb9eb369f
#: ../src/Doc/c-api/unicode.rst:124
msgid "Return 1 or 0 depending on whether *ch* is a lowercase character."
msgstr ""
# f87df29960d7459eb1b47c1cbb40044e
#: ../src/Doc/c-api/unicode.rst:129
msgid "Return 1 or 0 depending on whether *ch* is an uppercase character."
msgstr ""
# 050e311c22d244dfbed563a7f0c9fec6
#: ../src/Doc/c-api/unicode.rst:134
msgid "Return 1 or 0 depending on whether *ch* is a titlecase character."
msgstr ""
# d23af76585314407983f80c2d4bcdd08
#: ../src/Doc/c-api/unicode.rst:139
msgid "Return 1 or 0 depending on whether *ch* is a linebreak character."
msgstr ""
# e4eb897aa1be4629b6318cbe3b15ef71
#: ../src/Doc/c-api/unicode.rst:144
msgid "Return 1 or 0 depending on whether *ch* is a decimal character."
msgstr ""
# 35775eeac9e64fd98c72c7c0ad36b0d6
#: ../src/Doc/c-api/unicode.rst:149
msgid "Return 1 or 0 depending on whether *ch* is a digit character."
msgstr ""
# 86cbeb725aee4a5492eada54210b49f5
#: ../src/Doc/c-api/unicode.rst:154
msgid "Return 1 or 0 depending on whether *ch* is a numeric character."
msgstr ""
# f710e599cfc34ba3b1c30134f86a2c4f
#: ../src/Doc/c-api/unicode.rst:159
msgid "Return 1 or 0 depending on whether *ch* is an alphabetic character."
msgstr ""
# 3439f86cf17b490390dac4f681e3b628
#: ../src/Doc/c-api/unicode.rst:164
msgid "Return 1 or 0 depending on whether *ch* is an alphanumeric character."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:166
msgid "These APIs can be used for fast direct character conversions:"
msgstr ""
# 9495e04a7fb84a96878f15a9f747289d
#: ../src/Doc/c-api/unicode.rst:171
msgid "Return the character *ch* converted to lower case."
msgstr ""
# c43aeefddee44c46a5bf8e14793b3a98
#: ../src/Doc/c-api/unicode.rst:176
msgid "Return the character *ch* converted to upper case."
msgstr ""
# a0350c936649458484e54ed0d4f005ac
#: ../src/Doc/c-api/unicode.rst:181
msgid "Return the character *ch* converted to title case."
msgstr ""
# 14fb419ad8ce40eab4b0a8201f0db35c
#: ../src/Doc/c-api/unicode.rst:186
msgid ""
"Return the character *ch* converted to a decimal positive integer. Return "
"``-1`` if this is not possible. This macro does not raise exceptions."
msgstr ""
# 2f88eabae6af4c7cbb6e1d29cf53f16e
#: ../src/Doc/c-api/unicode.rst:192
msgid ""
"Return the character *ch* converted to a single digit integer. Return ``-1`` "
"if this is not possible. This macro does not raise exceptions."
msgstr ""
# ad6b1ccb82714bd790ae060181fd0fef
#: ../src/Doc/c-api/unicode.rst:198
msgid ""
"Return the character *ch* converted to a double. Return ``-1.0`` if this is "
"not possible. This macro does not raise exceptions."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:203
msgid "Plain Py_UNICODE"
msgstr ""
#: ../src/Doc/c-api/unicode.rst:205
msgid ""
"To create Unicode objects and access their basic sequence properties, use "
"these APIs:"
msgstr ""
# 5eaff14365494c479384c54e75387c63
#: ../src/Doc/c-api/unicode.rst:211
msgid ""
"Create a Unicode object from the Py_UNICODE buffer *u* of the given size. "
"*u* may be *NULL* which causes the contents to be undefined. It is the "
"user's responsibility to fill in the needed data. The buffer is copied into "
"the new object. If the buffer is not *NULL*, the return value might be a "
"shared object. Therefore, modification of the resulting Unicode object is "
"only allowed when *u* is *NULL*."
msgstr ""
# 2aca839ffc004e31bc57a4b90ee9f7d2
#: ../src/Doc/c-api/unicode.rst:225
msgid ""
"Create a Unicode object from the char buffer *u*. The bytes will be "
"interpreted as being UTF-8 encoded. *u* may also be *NULL* which causes the "
"contents to be undefined. It is the user's responsibility to fill in the "
"needed data. The buffer is copied into the new object. If the buffer is not "
"*NULL*, the return value might be a shared object. Therefore, modification "
"of the resulting Unicode object is only allowed when *u* is *NULL*."
msgstr ""
# 80ecd6dc859645f59e54aa8b9a472668
#: ../src/Doc/c-api/unicode.rst:237
msgid ""
"Create a Unicode object from an UTF-8 encoded null-terminated char buffer "
"*u*."
msgstr ""
# b1c2c885183e4bfda35e617a48f34460
#: ../src/Doc/c-api/unicode.rst:245
msgid ""
"Take a C :c:func:`printf`\\ -style *format* string and a variable number of "
"arguments, calculate the size of the resulting Python unicode string and "
"return a string with the values formatted into it. The variable arguments "
"must be C types and must correspond exactly to the format characters in the "
"*format* string. The following format characters are allowed:"
msgstr ""
# 50d78f0c978446fe893d5f96828ffd31
#: ../src/Doc/c-api/unicode.rst:300
msgid ":attr:`%U`"
msgstr ""
#: ../src/Doc/c-api/unicode.rst:300 ../src/Doc/c-api/unicode.rst:309
#: ../src/Doc/c-api/unicode.rst:312
#, fuzzy
msgid "PyObject\\*"
msgstr "Objets bytes"
#: ../src/Doc/c-api/unicode.rst:300
#, fuzzy
msgid "A unicode object."
msgstr "Objets Code"
# ffa02639265b41dea6ccd071c43e539c
#: ../src/Doc/c-api/unicode.rst:302
msgid ":attr:`%V`"
msgstr ""
# 028a1fc9f106449d8fa02c4f99806b8c
#: ../src/Doc/c-api/unicode.rst:302
msgid "PyObject\\*, char \\*"
msgstr ""
# e6795526b7e443289ad25c03cf0caeef
#: ../src/Doc/c-api/unicode.rst:302
msgid ""
"A unicode object (which may be *NULL*) and a null-terminated C character "
"array as a second parameter (which will be used, if the first parameter is "
"*NULL*)."
msgstr ""
# bf8001a6a4cf452b82d5d3ec3b8ffee5
#: ../src/Doc/c-api/unicode.rst:309
msgid ":attr:`%S`"
msgstr ""
# 125ab6f943b0425791624b1fd8a8f4ef
#: ../src/Doc/c-api/unicode.rst:309
msgid "The result of calling :func:`PyObject_Unicode`."
msgstr ""
# 6a2fdbba877949b9ad6f5886ecf3fcf7
#: ../src/Doc/c-api/unicode.rst:312
msgid ":attr:`%R`"
msgstr ""
# d643da66f5a64188a5cba92ff2aa4778
#: ../src/Doc/c-api/unicode.rst:312
msgid "The result of calling :func:`PyObject_Repr`."
msgstr ""
# ec0bc51aed8e4872b0934ed422073c91
#: ../src/Doc/c-api/unicode.rst:324
msgid ""
"Identical to :func:`PyUnicode_FromFormat` except that it takes exactly two "
"arguments."
msgstr ""
# 3c6037d4c68b442ebb685fdfbd3f8b23
#: ../src/Doc/c-api/unicode.rst:332
msgid ""
"Return a read-only pointer to the Unicode object's internal :c:type:"
"`Py_UNICODE` buffer, *NULL* if *unicode* is not a Unicode object. Note that "
"the resulting :c:type:`Py_UNICODE*` string may contain embedded null "
"characters, which would cause the string to be truncated when used in most C "
"functions."
msgstr ""
# 22935ae9d25a4eb6bb68c94e42ca29dd
#: ../src/Doc/c-api/unicode.rst:341
msgid "Return the length of the Unicode object."
msgstr ""
# 246b9362764d48538b630ac2d7be353f
#: ../src/Doc/c-api/unicode.rst:350
msgid ""
"Coerce an encoded object *obj* to an Unicode object and return a reference "
"with incremented refcount."
msgstr ""
# 4eb07736b2064e1aaebb331eb48d809d
#: ../src/Doc/c-api/unicode.rst:353
msgid ""
"String and other char buffer compatible objects are decoded according to the "
"given encoding and using the error handling defined by errors. Both can be "
"*NULL* to have the interface use the default values (see the next section "
"for details)."
msgstr ""
# 33063a7107684b11bf156968f6dfa726
#: ../src/Doc/c-api/unicode.rst:358
msgid ""
"All other objects, including Unicode objects, cause a :exc:`TypeError` to be "
"set."
msgstr ""
# c1c8bac4e2dc4aaeb194f35eec7780de
#: ../src/Doc/c-api/unicode.rst:361
msgid ""
"The API returns *NULL* if there was an error. The caller is responsible for "
"decref'ing the returned objects."
msgstr ""
# 3f4b17c9acaa41e08a154c4069b602e2
#: ../src/Doc/c-api/unicode.rst:367
msgid ""
"Shortcut for ``PyUnicode_FromEncodedObject(obj, NULL, \"strict\")`` which is "
"used throughout the interpreter whenever coercion to Unicode is needed."
msgstr ""
# ea34aa17d1ec4dffae6e7f215788ce95
#: ../src/Doc/c-api/unicode.rst:370
msgid ""
"If the platform supports :c:type:`wchar_t` and provides a header file wchar."
"h, Python can interface directly to this type using the following functions. "
"Support is optimized if Python's own :c:type:`Py_UNICODE` type is identical "
"to the system's :c:type:`wchar_t`."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:377
msgid "wchar_t Support"
msgstr ""
# aee882bafdcb47a498fcd460a924299d
#: ../src/Doc/c-api/unicode.rst:379
msgid ":c:type:`wchar_t` support for platforms which support it:"
msgstr ""
# 063fdc2cdf3841a08c4cc1d799666c42
#: ../src/Doc/c-api/unicode.rst:383
msgid ""
"Create a Unicode object from the :c:type:`wchar_t` buffer *w* of the given "
"*size*. Return *NULL* on failure."
msgstr ""
# 5b777f25979549198602a39e39b4f803
#: ../src/Doc/c-api/unicode.rst:393
msgid ""
"Copy the Unicode object contents into the :c:type:`wchar_t` buffer *w*. At "
"most *size* :c:type:`wchar_t` characters are copied (excluding a possibly "
"trailing 0-termination character). Return the number of :c:type:`wchar_t` "
"characters copied or -1 in case of an error. Note that the resulting :c:"
"type:`wchar_t` string may or may not be 0-terminated. It is the "
"responsibility of the caller to make sure that the :c:type:`wchar_t` string "
"is 0-terminated in case this is required by the application. Also, note that "
"the :c:type:`wchar_t*` string might contain null characters, which would "
"cause the string to be truncated when used with most C functions."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:412
msgid "Built-in Codecs"
msgstr ""
#: ../src/Doc/c-api/unicode.rst:414
msgid ""
"Python provides a set of built-in codecs which are written in C for speed. "
"All of these codecs are directly usable via the following functions."
msgstr ""
# 38523877927647d8888699db0fbeb3a1
#: ../src/Doc/c-api/unicode.rst:417
msgid ""
"Many of the following APIs take two arguments encoding and errors, and they "
"have the same semantics as the ones of the built-in :func:`unicode` Unicode "
"object constructor."
msgstr ""
# 93cbcd53e957424da36d9aadd9b43596
#: ../src/Doc/c-api/unicode.rst:421
msgid ""
"Setting encoding to *NULL* causes the default encoding to be used which is "
"ASCII. The file system calls should use :c:data:"
"`Py_FileSystemDefaultEncoding` as the encoding for file names. This variable "
"should be treated as read-only: on some systems, it will be a pointer to a "
"static string, on others, it will change at run-time (such as when the "
"application invokes setlocale)."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:427
msgid ""
"Error handling is set by errors which may also be set to *NULL* meaning to "
"use the default handling defined for the codec. Default error handling for "
"all built-in codecs is \"strict\" (:exc:`ValueError` is raised)."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:431
msgid ""
"The codecs all use a similar interface. Only deviation from the following "
"generic ones are documented for simplicity."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:436
msgid "Generic Codecs"
msgstr ""
#: ../src/Doc/c-api/unicode.rst:438
msgid "These are the generic codec APIs:"
msgstr ""
# f12dc33957df42a6836e840d8ef2cec5
#: ../src/Doc/c-api/unicode.rst:443
msgid ""
"Create a Unicode object by decoding *size* bytes of the encoded string *s*. "
"*encoding* and *errors* have the same meaning as the parameters of the same "
"name in the :func:`unicode` built-in function. The codec to be used is "
"looked up using the Python codec registry. Return *NULL* if an exception "
"was raised by the codec."
msgstr ""
# c0703b08a9cd4d60a07f1028f4ac3c63
#: ../src/Doc/c-api/unicode.rst:456
msgid ""
"Encode the :c:type:`Py_UNICODE` buffer *s* of the given *size* and return a "
"Python string object. *encoding* and *errors* have the same meaning as the "
"parameters of the same name in the Unicode :meth:`~unicode.encode` method. "
"The codec to be used is looked up using the Python codec registry. Return "
"*NULL* if an exception was raised by the codec."
msgstr ""
# 9910721668434016bbd6ae863dcae1f1
#: ../src/Doc/c-api/unicode.rst:469
msgid ""
"Encode a Unicode object and return the result as Python string object. "
"*encoding* and *errors* have the same meaning as the parameters of the same "
"name in the Unicode :meth:`encode` method. The codec to be used is looked up "
"using the Python codec registry. Return *NULL* if an exception was raised by "
"the codec."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:477
msgid "UTF-8 Codecs"
msgstr ""
#: ../src/Doc/c-api/unicode.rst:479
msgid "These are the UTF-8 codec APIs:"
msgstr ""
# 132bec767fbc40c1b69c82e23e760d2e
#: ../src/Doc/c-api/unicode.rst:484
msgid ""
"Create a Unicode object by decoding *size* bytes of the UTF-8 encoded string "
"*s*. Return *NULL* if an exception was raised by the codec."
msgstr ""
# 12787468d62d45ce9f973240381acb64
#: ../src/Doc/c-api/unicode.rst:494
msgid ""
"If *consumed* is *NULL*, behave like :c:func:`PyUnicode_DecodeUTF8`. If "
"*consumed* is not *NULL*, trailing incomplete UTF-8 byte sequences will not "
"be treated as an error. Those bytes will not be decoded and the number of "
"bytes that have been decoded will be stored in *consumed*."
msgstr ""
# dbb6662d78cd4290b38d7b3b42ca4082
#: ../src/Doc/c-api/unicode.rst:508
msgid ""
"Encode the :c:type:`Py_UNICODE` buffer *s* of the given *size* using UTF-8 "
"and return a Python string object. Return *NULL* if an exception was raised "
"by the codec."
msgstr ""
# e170c0faaeb64c1187163955c7272e40
#: ../src/Doc/c-api/unicode.rst:518
msgid ""
"Encode a Unicode object using UTF-8 and return the result as Python string "
"object. Error handling is \"strict\". Return *NULL* if an exception was "
"raised by the codec."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:524
msgid "UTF-32 Codecs"
msgstr ""
#: ../src/Doc/c-api/unicode.rst:526
msgid "These are the UTF-32 codec APIs:"
msgstr ""
# f5b4763546854e13b08bdf6a589adf7e
#: ../src/Doc/c-api/unicode.rst:531
msgid ""
"Decode *size* bytes from a UTF-32 encoded buffer string and return the "
"corresponding Unicode object. *errors* (if non-*NULL*) defines the error "
"handling. It defaults to \"strict\"."
msgstr ""
# cdfe6223fb34499085d96e172ff8dcdd
# 7fa1ede9533f4351a1c60530f7c62bd0
#: ../src/Doc/c-api/unicode.rst:535 ../src/Doc/c-api/unicode.rst:611
msgid ""
"If *byteorder* is non-*NULL*, the decoder starts decoding using the given "
"byte order::"
msgstr ""
# 19b92829ef3c4e57ae23fd0c11c409bc
#: ../src/Doc/c-api/unicode.rst:542
msgid ""
"If ``*byteorder`` is zero, and the first four bytes of the input data are a "
"byte order mark (BOM), the decoder switches to this byte order and the BOM "
"is not copied into the resulting Unicode string. If ``*byteorder`` is "
"``-1`` or ``1``, any byte order mark is copied to the output."
msgstr ""
# 78352cfd60324934b525bd7a8699b903
# 0f4ea9a1726c4e499ff783530ccb3953
#: ../src/Doc/c-api/unicode.rst:547 ../src/Doc/c-api/unicode.rst:624
msgid ""
"After completion, *\\*byteorder* is set to the current byte order at the end "
"of input data."
msgstr ""
# 738bad32545342f7b00532dd77ccc834
#: ../src/Doc/c-api/unicode.rst:550
msgid ""
"In a narrow build codepoints outside the BMP will be decoded as surrogate "
"pairs."
msgstr ""
# c73d2a5882ff4b50b8151fd43bd06dd0
# 800d224dc1a24eedadef09a55bfa0c28
#: ../src/Doc/c-api/unicode.rst:552 ../src/Doc/c-api/unicode.rst:627
msgid "If *byteorder* is *NULL*, the codec starts in native order mode."
msgstr ""
# a2cf4f4ce0844f988b230e3918579a28
# 4143117fc3964ad3b5b9fd3e469bedd7
# 91b0ce47ab724913a9a2c71cb0207db3
# db21e9b031974a289639cd8f97bda8f8
#: ../src/Doc/c-api/unicode.rst:554 ../src/Doc/c-api/unicode.rst:585
#: ../src/Doc/c-api/unicode.rst:629 ../src/Doc/c-api/unicode.rst:668
msgid "Return *NULL* if an exception was raised by the codec."
msgstr ""
# 361419dc4c5e45b0ae21b1e3f4506dc2
#: ../src/Doc/c-api/unicode.rst:561
msgid ""
"If *consumed* is *NULL*, behave like :c:func:`PyUnicode_DecodeUTF32`. If "
"*consumed* is not *NULL*, :c:func:`PyUnicode_DecodeUTF32Stateful` will not "
"treat trailing incomplete UTF-32 byte sequences (such as a number of bytes "
"not divisible by four) as an error. Those bytes will not be decoded and the "
"number of bytes that have been decoded will be stored in *consumed*."
msgstr ""
# 39314fbbe20144fc94b43935e64b5839
#: ../src/Doc/c-api/unicode.rst:572
msgid ""
"Return a Python bytes object holding the UTF-32 encoded value of the Unicode "
"data in *s*. Output is written according to the following byte order::"
msgstr ""
# 5c14f858fb88452cb63a3db19ca0cb90
# 684e708fac694f268cbbe795f51b55d0
#: ../src/Doc/c-api/unicode.rst:579 ../src/Doc/c-api/unicode.rst:661
msgid ""
"If byteorder is ``0``, the output string will always start with the Unicode "
"BOM mark (U+FEFF). In the other two modes, no BOM mark is prepended."
msgstr ""
# a6c651bc02fb4a89b26aaca0ec980142
#: ../src/Doc/c-api/unicode.rst:582
msgid ""
"If *Py_UNICODE_WIDE* is not defined, surrogate pairs will be output as a "
"single codepoint."
msgstr ""
# f9f427837dcd42108b93d224fa5aa84f
#: ../src/Doc/c-api/unicode.rst:592
msgid ""
"Return a Python string using the UTF-32 encoding in native byte order. The "
"string always starts with a BOM mark. Error handling is \"strict\". Return "
"*NULL* if an exception was raised by the codec."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:600
msgid "UTF-16 Codecs"
msgstr ""
#: ../src/Doc/c-api/unicode.rst:602
msgid "These are the UTF-16 codec APIs:"
msgstr ""
# 1184946599154f0cbeb331a2180c9a13
#: ../src/Doc/c-api/unicode.rst:607
msgid ""
"Decode *size* bytes from a UTF-16 encoded buffer string and return the "
"corresponding Unicode object. *errors* (if non-*NULL*) defines the error "
"handling. It defaults to \"strict\"."
msgstr ""
# fa28c075b5a94545a131b25f2f859ad0
#: ../src/Doc/c-api/unicode.rst:618
msgid ""
"If ``*byteorder`` is zero, and the first two bytes of the input data are a "
"byte order mark (BOM), the decoder switches to this byte order and the BOM "
"is not copied into the resulting Unicode string. If ``*byteorder`` is "
"``-1`` or ``1``, any byte order mark is copied to the output (where it will "
"result in either a ``\\ufeff`` or a ``\\ufffe`` character)."
msgstr ""
# c0e0112252944b459f03dea01699c3b4
#: ../src/Doc/c-api/unicode.rst:638
msgid ""
"If *consumed* is *NULL*, behave like :c:func:`PyUnicode_DecodeUTF16`. If "
"*consumed* is not *NULL*, :c:func:`PyUnicode_DecodeUTF16Stateful` will not "
"treat trailing incomplete UTF-16 byte sequences (such as an odd number of "
"bytes or a split surrogate pair) as an error. Those bytes will not be "
"decoded and the number of bytes that have been decoded will be stored in "
"*consumed*."
msgstr ""
# 9f000c486ef24791b0b6e104e7bf7b14
#: ../src/Doc/c-api/unicode.rst:654
msgid ""
"Return a Python string object holding the UTF-16 encoded value of the "
"Unicode data in *s*. Output is written according to the following byte "
"order::"
msgstr ""
# 3badf59bf5ca4a22ab2885ddbfbb2f3c
#: ../src/Doc/c-api/unicode.rst:664
msgid ""
"If *Py_UNICODE_WIDE* is defined, a single :c:type:`Py_UNICODE` value may get "
"represented as a surrogate pair. If it is not defined, each :c:type:"
"`Py_UNICODE` values is interpreted as an UCS-2 character."
msgstr ""
# 15f368dbcb4843adae6fe7e2198019b7
#: ../src/Doc/c-api/unicode.rst:677
msgid ""
"Return a Python string using the UTF-16 encoding in native byte order. The "
"string always starts with a BOM mark. Error handling is \"strict\". Return "
"*NULL* if an exception was raised by the codec."
msgstr ""
# 8a74b65022aa48cabefe8f14f049bad9
#: ../src/Doc/c-api/unicode.rst:683
msgid "UTF-7 Codecs"
msgstr ""
# a91eef1d98dd4856abd8f78830a2f727
#: ../src/Doc/c-api/unicode.rst:685
msgid "These are the UTF-7 codec APIs:"
msgstr ""
# 1167187255414a8986be3ec9eaf993a3
#: ../src/Doc/c-api/unicode.rst:690
msgid ""
"Create a Unicode object by decoding *size* bytes of the UTF-7 encoded string "
"*s*. Return *NULL* if an exception was raised by the codec."
msgstr ""
# fb385c48cd4e455abe9bc7032528983a
#: ../src/Doc/c-api/unicode.rst:696
msgid ""
"If *consumed* is *NULL*, behave like :c:func:`PyUnicode_DecodeUTF7`. If "
"*consumed* is not *NULL*, trailing incomplete UTF-7 base-64 sections will "
"not be treated as an error. Those bytes will not be decoded and the number "
"of bytes that have been decoded will be stored in *consumed*."
msgstr ""
# dc2599a7081e4b5b851978a65e4dc562
#: ../src/Doc/c-api/unicode.rst:704
msgid ""
"Encode the :c:type:`Py_UNICODE` buffer of the given size using UTF-7 and "
"return a Python bytes object. Return *NULL* if an exception was raised by "
"the codec."
msgstr ""
# b9913eebd2f04730ae33aff022ae3cbd
#: ../src/Doc/c-api/unicode.rst:708
msgid ""
"If *base64SetO* is nonzero, \"Set O\" (punctuation that has no otherwise "
"special meaning) will be encoded in base-64. If *base64WhiteSpace* is "
"nonzero, whitespace will be encoded in base-64. Both are set to zero for "
"the Python \"utf-7\" codec."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:715
msgid "Unicode-Escape Codecs"
msgstr ""
#: ../src/Doc/c-api/unicode.rst:717
msgid "These are the \"Unicode Escape\" codec APIs:"
msgstr ""
# b1160519d6cc4a798cae86ca9e9cb990
#: ../src/Doc/c-api/unicode.rst:722
msgid ""
"Create a Unicode object by decoding *size* bytes of the Unicode-Escape "
"encoded string *s*. Return *NULL* if an exception was raised by the codec."
msgstr ""
# 8cb23e01557b44fcb153bc487f0f994b
#: ../src/Doc/c-api/unicode.rst:732
msgid ""
"Encode the :c:type:`Py_UNICODE` buffer of the given *size* using Unicode-"
"Escape and return a Python string object. Return *NULL* if an exception was "
"raised by the codec."
msgstr ""
# 66b6ead7dd1a463f85d21c4043f1090e
#: ../src/Doc/c-api/unicode.rst:743
msgid ""
"Encode a Unicode object using Unicode-Escape and return the result as Python "
"string object. Error handling is \"strict\". Return *NULL* if an exception "
"was raised by the codec."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:749
msgid "Raw-Unicode-Escape Codecs"
msgstr ""
#: ../src/Doc/c-api/unicode.rst:751
msgid "These are the \"Raw Unicode Escape\" codec APIs:"
msgstr ""
# 8d0a28566d4445c1bea4c98a2b55e8a9
#: ../src/Doc/c-api/unicode.rst:756
msgid ""
"Create a Unicode object by decoding *size* bytes of the Raw-Unicode-Escape "
"encoded string *s*. Return *NULL* if an exception was raised by the codec."
msgstr ""
# 952ca6356d494724b105dfcd7f71eb0e
#: ../src/Doc/c-api/unicode.rst:766
msgid ""
"Encode the :c:type:`Py_UNICODE` buffer of the given *size* using Raw-Unicode-"
"Escape and return a Python string object. Return *NULL* if an exception was "
"raised by the codec."
msgstr ""
# 15927bbf659d42efb457a22f330df4cb
#: ../src/Doc/c-api/unicode.rst:777
msgid ""
"Encode a Unicode object using Raw-Unicode-Escape and return the result as "
"Python string object. Error handling is \"strict\". Return *NULL* if an "
"exception was raised by the codec."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:783
msgid "Latin-1 Codecs"
msgstr ""
#: ../src/Doc/c-api/unicode.rst:785
msgid ""
"These are the Latin-1 codec APIs: Latin-1 corresponds to the first 256 "
"Unicode ordinals and only these are accepted by the codecs during encoding."
msgstr ""
# 42d563ad417345349b6963b0bf36a59b
#: ../src/Doc/c-api/unicode.rst:791
msgid ""
"Create a Unicode object by decoding *size* bytes of the Latin-1 encoded "
"string *s*. Return *NULL* if an exception was raised by the codec."
msgstr ""
# 5cd56b293a5c464baa607afe1762e9a5
#: ../src/Doc/c-api/unicode.rst:801
msgid ""
"Encode the :c:type:`Py_UNICODE` buffer of the given *size* using Latin-1 and "
"return a Python string object. Return *NULL* if an exception was raised by "
"the codec."
msgstr ""
# 626427dcaefe441cbba254dc8a09fe9a
#: ../src/Doc/c-api/unicode.rst:811
msgid ""
"Encode a Unicode object using Latin-1 and return the result as Python string "
"object. Error handling is \"strict\". Return *NULL* if an exception was "
"raised by the codec."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:817
msgid "ASCII Codecs"
msgstr ""
#: ../src/Doc/c-api/unicode.rst:819
msgid ""
"These are the ASCII codec APIs. Only 7-bit ASCII data is accepted. All "
"other codes generate errors."
msgstr ""
# 9f9e308517b84073991e0e9b5b336112
#: ../src/Doc/c-api/unicode.rst:825
msgid ""
"Create a Unicode object by decoding *size* bytes of the ASCII encoded string "
"*s*. Return *NULL* if an exception was raised by the codec."
msgstr ""
# 28e64204387949cb950f2e48233736b7
#: ../src/Doc/c-api/unicode.rst:835
msgid ""
"Encode the :c:type:`Py_UNICODE` buffer of the given *size* using ASCII and "
"return a Python string object. Return *NULL* if an exception was raised by "
"the codec."
msgstr ""
# 919b0c429211435f9def808090e52332
#: ../src/Doc/c-api/unicode.rst:845
msgid ""
"Encode a Unicode object using ASCII and return the result as Python string "
"object. Error handling is \"strict\". Return *NULL* if an exception was "
"raised by the codec."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:851
msgid "Character Map Codecs"
msgstr ""
#: ../src/Doc/c-api/unicode.rst:853
msgid ""
"This codec is special in that it can be used to implement many different "
"codecs (and this is in fact what was done to obtain most of the standard "
"codecs included in the :mod:`encodings` package). The codec uses mapping to "
"encode and decode characters."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:858
msgid ""
"Decoding mappings must map single string characters to single Unicode "
"characters, integers (which are then interpreted as Unicode ordinals) or "
"None (meaning \"undefined mapping\" and causing an error)."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:862
msgid ""
"Encoding mappings must map single Unicode characters to single string "
"characters, integers (which are then interpreted as Latin-1 ordinals) or "
"None (meaning \"undefined mapping\" and causing an error)."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:866
msgid ""
"The mapping objects provided must only support the __getitem__ mapping "
"interface."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:869
msgid ""
"If a character lookup fails with a LookupError, the character is copied as-"
"is meaning that its ordinal value will be interpreted as Unicode or Latin-1 "
"ordinal resp. Because of this, mappings only need to contain those mappings "
"which map characters to different code points."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:874
msgid "These are the mapping codec APIs:"
msgstr ""
# 98ee0450f2f8493f93ee67dd861c50e8
#: ../src/Doc/c-api/unicode.rst:878
msgid ""
"Create a Unicode object by decoding *size* bytes of the encoded string *s* "
"using the given *mapping* object. Return *NULL* if an exception was raised "
"by the codec. If *mapping* is *NULL* latin-1 decoding will be done. Else it "
"can be a dictionary mapping byte or a unicode string, which is treated as a "
"lookup table. Byte values greater that the length of the string and U+FFFE "
"\"characters\" are treated as \"undefined mapping\"."
msgstr ""
# a5d4bc1e1f0e44d08a7a6ab9e7665037
#: ../src/Doc/c-api/unicode.rst:895
msgid ""
"Encode the :c:type:`Py_UNICODE` buffer of the given *size* using the given "
"*mapping* object and return a Python string object. Return *NULL* if an "
"exception was raised by the codec."
msgstr ""
# cc12977c49da461186d7d0cc029fc300
#: ../src/Doc/c-api/unicode.rst:906
msgid ""
"Encode a Unicode object using the given *mapping* object and return the "
"result as Python string object. Error handling is \"strict\". Return "
"*NULL* if an exception was raised by the codec."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:910
msgid "The following codec API is special in that maps Unicode to Unicode."
msgstr ""
# e2ef0f51bcb246bebc5e379b822b1182
#: ../src/Doc/c-api/unicode.rst:915
msgid ""
"Translate a :c:type:`Py_UNICODE` buffer of the given *size* by applying a "
"character mapping *table* to it and return the resulting Unicode object. "
"Return *NULL* when an exception was raised by the codec."
msgstr ""
# 7b05dc8d162347768864afbf3aca2df5
#: ../src/Doc/c-api/unicode.rst:919
msgid ""
"The *mapping* table must map Unicode ordinal integers to Unicode ordinal "
"integers or None (causing deletion of the character)."
msgstr ""
# 74c9688abbec44dc881498e4f9614cbd
# fed0baa31c384043be1015b42d9c3227
#: ../src/Doc/c-api/unicode.rst:922 ../src/Doc/c-api/unicode.rst:1024
msgid ""
"Mapping tables need only provide the :meth:`__getitem__` interface; "
"dictionaries and sequences work well. Unmapped character ordinals (ones "
"which cause a :exc:`LookupError`) are left untouched and are copied as-is."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:932
msgid "MBCS codecs for Windows"
msgstr ""
#: ../src/Doc/c-api/unicode.rst:934
msgid ""
"These are the MBCS codec APIs. They are currently only available on Windows "
"and use the Win32 MBCS converters to implement the conversions. Note that "
"MBCS (or DBCS) is a class of encodings, not just one. The target encoding "
"is defined by the user settings on the machine running the codec."
msgstr ""
# 4fd0d852222544ef8167eb4b3cda5d39
#: ../src/Doc/c-api/unicode.rst:942
msgid ""
"Create a Unicode object by decoding *size* bytes of the MBCS encoded string "
"*s*. Return *NULL* if an exception was raised by the codec."
msgstr ""
# de8a0d5971bb4f99a0109503334de476
#: ../src/Doc/c-api/unicode.rst:952
msgid ""
"If *consumed* is *NULL*, behave like :c:func:`PyUnicode_DecodeMBCS`. If "
"*consumed* is not *NULL*, :c:func:`PyUnicode_DecodeMBCSStateful` will not "
"decode trailing lead byte and the number of bytes that have been decoded "
"will be stored in *consumed*."
msgstr ""
# b43de6be22254ec2a80d07de0d2698af
#: ../src/Doc/c-api/unicode.rst:962
msgid ""
"Encode the :c:type:`Py_UNICODE` buffer of the given *size* using MBCS and "
"return a Python string object. Return *NULL* if an exception was raised by "
"the codec."
msgstr ""
# 04380236ed334e7e8e687abd3f40f9a9
#: ../src/Doc/c-api/unicode.rst:972
msgid ""
"Encode a Unicode object using MBCS and return the result as Python string "
"object. Error handling is \"strict\". Return *NULL* if an exception was "
"raised by the codec."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:978
msgid "Methods & Slots"
msgstr ""
#: ../src/Doc/c-api/unicode.rst:983
msgid "Methods and Slot Functions"
msgstr ""
#: ../src/Doc/c-api/unicode.rst:985
msgid ""
"The following APIs are capable of handling Unicode objects and strings on "
"input (we refer to them as strings in the descriptions) and return Unicode "
"objects or integers as appropriate."
msgstr ""
#: ../src/Doc/c-api/unicode.rst:989
msgid "They all return *NULL* or ``-1`` if an exception occurs."
msgstr ""
# 81d8b30195ef49a5a96f993260cb4c50
#: ../src/Doc/c-api/unicode.rst:994
msgid "Concat two strings giving a new Unicode string."
msgstr ""
# 5e4ac6780b1348e29a284bbceaa8c7cd
#: ../src/Doc/c-api/unicode.rst:999
msgid ""
"Split a string giving a list of Unicode strings. If *sep* is *NULL*, "
"splitting will be done at all whitespace substrings. Otherwise, splits "
"occur at the given separator. At most *maxsplit* splits will be done. If "
"negative, no limit is set. Separators are not included in the resulting "
"list."
msgstr ""
# 2de90e8489dd40208db975ea764e091f
#: ../src/Doc/c-api/unicode.rst:1011
msgid ""
"Split a Unicode string at line breaks, returning a list of Unicode strings. "
"CRLF is considered to be one line break. If *keepend* is 0, the Line break "
"characters are not included in the resulting strings."
msgstr ""
# dc4fdf20898c470d96d3aeb3937402eb
#: ../src/Doc/c-api/unicode.rst:1018
msgid ""
"Translate a string by applying a character mapping table to it and return "
"the resulting Unicode object."
msgstr ""
# 7604b170f1924367acac5a1a6225b24d
#: ../src/Doc/c-api/unicode.rst:1021
msgid ""
"The mapping table must map Unicode ordinal integers to Unicode ordinal "
"integers or None (causing deletion of the character)."
msgstr ""
# 32d4944da57440af8d3d60da4adf89c6
#: ../src/Doc/c-api/unicode.rst:1028
msgid ""
"*errors* has the usual meaning for codecs. It may be *NULL* which indicates "
"to use the default error handling."
msgstr ""
# fcb3ffe093184cf29d2d31ef5a1f9327
#: ../src/Doc/c-api/unicode.rst:1034
msgid ""
"Join a sequence of strings using the given *separator* and return the "
"resulting Unicode string."
msgstr ""
# d8be425e0aec446ab6cd7a0b99bbb210
#: ../src/Doc/c-api/unicode.rst:1040
msgid ""
"Return 1 if *substr* matches ``str[start:end]`` at the given tail end "
"(*direction* == -1 means to do a prefix match, *direction* == 1 a suffix "
"match), 0 otherwise. Return ``-1`` if an error occurred."
msgstr ""
# 4c305988cd484e068de740197132244e
#: ../src/Doc/c-api/unicode.rst:1052
msgid ""
"Return the first position of *substr* in ``str[start:end]`` using the given "
"*direction* (*direction* == 1 means to do a forward search, *direction* == "
"-1 a backward search). The return value is the index of the first match; a "
"value of ``-1`` indicates that no match was found, and ``-2`` indicates that "
"an error occurred and an exception has been set."
msgstr ""
# 94600171cfef41afa4deacb8620e708f
#: ../src/Doc/c-api/unicode.rst:1066
msgid ""
"Return the number of non-overlapping occurrences of *substr* in ``str[start:"
"end]``. Return ``-1`` if an error occurred."
msgstr ""
# bf0fff34d50f4f1f8864abef3d54870c
#: ../src/Doc/c-api/unicode.rst:1077
msgid ""
"Replace at most *maxcount* occurrences of *substr* in *str* with *replstr* "
"and return the resulting Unicode object. *maxcount* == -1 means replace all "
"occurrences."
msgstr ""
# c7d1a04585914592b8d33ef0b28c0765
#: ../src/Doc/c-api/unicode.rst:1088
msgid ""
"Compare two strings and return -1, 0, 1 for less than, equal, and greater "
"than, respectively."
msgstr ""
# f59384e300fd444687ab06becc2f4fe4
#: ../src/Doc/c-api/unicode.rst:1094
msgid "Rich compare two unicode strings and return one of the following:"
msgstr ""
# ad89295b20764acd8e4ef0fbf7698a42
#: ../src/Doc/c-api/unicode.rst:1096
msgid "``NULL`` in case an exception was raised"
msgstr ""
# 4d3bbb66fb8e4fae8a3548d6d752565f
#: ../src/Doc/c-api/unicode.rst:1097
msgid ":const:`Py_True` or :const:`Py_False` for successful comparisons"
msgstr ""
# d83ddccab43f4f1386e6d01bc56a431e
#: ../src/Doc/c-api/unicode.rst:1098
msgid ":const:`Py_NotImplemented` in case the type combination is unknown"
msgstr ""
# f16b39c0c48a452a892b4a9819a52c51
#: ../src/Doc/c-api/unicode.rst:1100
msgid ""
"Note that :const:`Py_EQ` and :const:`Py_NE` comparisons can cause a :exc:"
"`UnicodeWarning` in case the conversion of the arguments to Unicode fails "
"with a :exc:`UnicodeDecodeError`."
msgstr ""
# 16e4454f67ea42fbb5a79821a753694d
#: ../src/Doc/c-api/unicode.rst:1104
msgid ""
"Possible values for *op* are :const:`Py_GT`, :const:`Py_GE`, :const:"
"`Py_EQ`, :const:`Py_NE`, :const:`Py_LT`, and :const:`Py_LE`."
msgstr ""
# 094aa1e5ee6b4f2a83414d79abd8e784
#: ../src/Doc/c-api/unicode.rst:1110
msgid ""
"Return a new string object from *format* and *args*; this is analogous to "
"``format % args``."
msgstr ""
# c7e7a1fe822f4ef084ff6176c2013a6c
#: ../src/Doc/c-api/unicode.rst:1116
msgid ""
"Check whether *element* is contained in *container* and return true or false "
"accordingly."
msgstr ""
# b34a860ba6e34544aa27e30072fa541b
#: ../src/Doc/c-api/unicode.rst:1119
msgid ""
"*element* has to coerce to a one element Unicode string. ``-1`` is returned "
"if there was an error."
msgstr ""
#: ../src/Doc/c-api/utilities.rst:8
msgid "Utilities"
msgstr "Utilitaires"
#: ../src/Doc/c-api/utilities.rst:10
msgid ""
"The functions in this chapter perform various utility tasks, ranging from "
"helping C code be more portable across platforms, using Python modules from "
"C, and parsing function arguments and constructing Python values from C "
"values."
msgstr ""
#: ../src/Doc/c-api/veryhigh.rst:8
msgid "The Very High Level Layer"
msgstr ""
#: ../src/Doc/c-api/veryhigh.rst:10
msgid ""
"The functions in this chapter will let you execute Python source code given "
"in a file or a buffer, but they will not let you interact in a more detailed "
"way with the interpreter."
msgstr ""
#: ../src/Doc/c-api/veryhigh.rst:14
msgid ""
"Several of these functions accept a start symbol from the grammar as a "
"parameter. The available start symbols are :const:`Py_eval_input`, :const:"
"`Py_file_input`, and :const:`Py_single_input`. These are described "
"following the functions which accept them as parameters."
msgstr ""
# e15e7acc8fff49efbe16bbc0b09d8c28
#: ../src/Doc/c-api/veryhigh.rst:19
msgid ""
"Note also that several of these functions take :c:type:`FILE\\*` "
"parameters. One particular issue which needs to be handled carefully is "
"that the :c:type:`FILE` structure for different C libraries can be different "
"and incompatible. Under Windows (at least), it is possible for dynamically "
"linked extensions to actually use different libraries, so care should be "
"taken that :c:type:`FILE\\*` parameters are only passed to these functions "
"if it is certain that they were created by the same library that the Python "
"runtime is using."
msgstr ""
# e240a89e283544cb8c6d1f1dfe612824
#: ../src/Doc/c-api/veryhigh.rst:30
msgid ""
"The main program for the standard interpreter. This is made available for "
"programs which embed Python. The *argc* and *argv* parameters should be "
"prepared exactly as those which are passed to a C program's :c:func:`main` "
"function. It is important to note that the argument list may be modified "
"(but the contents of the strings pointed to by the argument list are not). "
"The return value will be ``0`` if the interpreter exits normally (ie, "
"without an exception), ``1`` if the interpreter exits due to an exception, "
"or ``2`` if the parameter list does not represent a valid Python command "
"line."
msgstr ""
# 209ef556e1f94029a806ab24df8cb198
#: ../src/Doc/c-api/veryhigh.rst:39
msgid ""
"Note that if an otherwise unhandled :exc:`SystemExit` is raised, this "
"function will not return ``1``, but exit the process, as long as "
"``Py_InspectFlag`` is not set."
msgstr ""
# ca72a7f5bc004489b99ab3a09774be11
#: ../src/Doc/c-api/veryhigh.rst:46
msgid ""
"This is a simplified interface to :c:func:`PyRun_AnyFileExFlags` below, "
"leaving *closeit* set to ``0`` and *flags* set to *NULL*."
msgstr ""
# 2251138778864fe68c88f93a05a4d329
#: ../src/Doc/c-api/veryhigh.rst:52
msgid ""
"This is a simplified interface to :c:func:`PyRun_AnyFileExFlags` below, "
"leaving the *closeit* argument set to ``0``."
msgstr ""
# 210d286cc1bb4ccba7e564f65ff43faf
#: ../src/Doc/c-api/veryhigh.rst:58
msgid ""
"This is a simplified interface to :c:func:`PyRun_AnyFileExFlags` below, "
"leaving the *flags* argument set to *NULL*."
msgstr ""
# 342e7f0008b94a15ad46a2af355801d1
#: ../src/Doc/c-api/veryhigh.rst:64
msgid ""
"If *fp* refers to a file associated with an interactive device (console or "
"terminal input or Unix pseudo-terminal), return the value of :c:func:"
"`PyRun_InteractiveLoop`, otherwise return the result of :c:func:"
"`PyRun_SimpleFile`. If *filename* is *NULL*, this function uses ``\"???\"`` "
"as the filename."
msgstr ""
# 2f57f6c2e6a648c189f9dde8405ef5b5
#: ../src/Doc/c-api/veryhigh.rst:73
msgid ""
"This is a simplified interface to :c:func:`PyRun_SimpleStringFlags` below, "
"leaving the *PyCompilerFlags\\** argument set to NULL."
msgstr ""
# 0593ca7c9345478885f579828548131b
#: ../src/Doc/c-api/veryhigh.rst:79
msgid ""
"Executes the Python source code from *command* in the :mod:`__main__` module "
"according to the *flags* argument. If :mod:`__main__` does not already "
"exist, it is created. Returns ``0`` on success or ``-1`` if an exception "
"was raised. If there was an error, there is no way to get the exception "
"information. For the meaning of *flags*, see below."
msgstr ""
# 3ca57820f7cd49c2b21acc8bb4cf2411
#: ../src/Doc/c-api/veryhigh.rst:85
msgid ""
"Note that if an otherwise unhandled :exc:`SystemExit` is raised, this "
"function will not return ``-1``, but exit the process, as long as "
"``Py_InspectFlag`` is not set."
msgstr ""
# 78ba3a020cda4c2289ee437979e80b2a
#: ../src/Doc/c-api/veryhigh.rst:92
msgid ""
"This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below, "
"leaving *closeit* set to ``0`` and *flags* set to *NULL*."
msgstr ""
# a2201dc70a1946718300a93047a92e53
#: ../src/Doc/c-api/veryhigh.rst:98
msgid ""
"This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below, "
"leaving *closeit* set to ``0``."
msgstr ""
# 29a8abbec7f74295bce52fc800d5d37f
#: ../src/Doc/c-api/veryhigh.rst:104
msgid ""
"This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below, "
"leaving *flags* set to *NULL*."
msgstr ""
# 04bef388e84740d29e40d6ca7001c5b0
#: ../src/Doc/c-api/veryhigh.rst:110
msgid ""
"Similar to :c:func:`PyRun_SimpleStringFlags`, but the Python source code is "
"read from *fp* instead of an in-memory string. *filename* should be the name "
"of the file. If *closeit* is true, the file is closed before "
"PyRun_SimpleFileExFlags returns."
msgstr ""
# 065499a7415e44cebeceb33e0aacec76
#: ../src/Doc/c-api/veryhigh.rst:118
msgid ""
"This is a simplified interface to :c:func:`PyRun_InteractiveOneFlags` below, "
"leaving *flags* set to *NULL*."
msgstr ""
# 58cb6419dfe8494ba29098d12a7df399
#: ../src/Doc/c-api/veryhigh.rst:124
msgid ""
"Read and execute a single statement from a file associated with an "
"interactive device according to the *flags* argument. The user will be "
"prompted using ``sys.ps1`` and ``sys.ps2``. Returns ``0`` when the input "
"was executed successfully, ``-1`` if there was an exception, or an error "
"code from the :file:`errcode.h` include file distributed as part of Python "
"if there was a parse error. (Note that :file:`errcode.h` is not included "
"by :file:`Python.h`, so must be included specifically if needed.)"
msgstr ""
# c431e791678d41b9a4e72541b341454a
#: ../src/Doc/c-api/veryhigh.rst:135
msgid ""
"This is a simplified interface to :c:func:`PyRun_InteractiveLoopFlags` "
"below, leaving *flags* set to *NULL*."
msgstr ""
# 19d7aba76bb54dd5aaa0b54e344c800c
#: ../src/Doc/c-api/veryhigh.rst:141
msgid ""
"Read and execute statements from a file associated with an interactive "
"device until EOF is reached. The user will be prompted using ``sys.ps1`` "
"and ``sys.ps2``. Returns ``0`` at EOF."
msgstr ""
# 844baff043a94756aa5010be5e6e36d1
#: ../src/Doc/c-api/veryhigh.rst:148
msgid ""
"This is a simplified interface to :c:func:"
"`PyParser_SimpleParseStringFlagsFilename` below, leaving *filename* set to "
"*NULL* and *flags* set to ``0``."
msgstr ""
# 27125dfe6c76430bb80080585a53f3c7
#: ../src/Doc/c-api/veryhigh.rst:155
msgid ""
"This is a simplified interface to :c:func:"
"`PyParser_SimpleParseStringFlagsFilename` below, leaving *filename* set to "
"*NULL*."
msgstr ""
# ec963554fc694523a2e29eb603772935
#: ../src/Doc/c-api/veryhigh.rst:162
msgid ""
"Parse Python source code from *str* using the start token *start* according "
"to the *flags* argument. The result can be used to create a code object "
"which can be evaluated efficiently. This is useful if a code fragment must "
"be evaluated many times."
msgstr ""
# 0c9f63084afb4b3cae773d0c10a2102d
#: ../src/Doc/c-api/veryhigh.rst:170
msgid ""
"This is a simplified interface to :c:func:`PyParser_SimpleParseFileFlags` "
"below, leaving *flags* set to ``0``"
msgstr ""
# 275ec0a22b5845e7885ce165faed0f98
#: ../src/Doc/c-api/veryhigh.rst:176
msgid ""
"Similar to :c:func:`PyParser_SimpleParseStringFlagsFilename`, but the Python "
"source code is read from *fp* instead of an in-memory string."
msgstr ""
# 6506047d8b8a455f908c91002eb11b7c
#: ../src/Doc/c-api/veryhigh.rst:182
msgid ""
"This is a simplified interface to :c:func:`PyRun_StringFlags` below, leaving "
"*flags* set to *NULL*."
msgstr ""
# e475f9d364a94c4e8516cdce14048bae
#: ../src/Doc/c-api/veryhigh.rst:188
msgid ""
"Execute Python source code from *str* in the context specified by the "
"dictionaries *globals* and *locals* with the compiler flags specified by "
"*flags*. The parameter *start* specifies the start token that should be "
"used to parse the source code."
msgstr ""
# c0271e6934614c85913c6268f5943310
#: ../src/Doc/c-api/veryhigh.rst:193
msgid ""
"Returns the result of executing the code as a Python object, or *NULL* if an "
"exception was raised."
msgstr ""
# dcb5d5e8b7c84072aac35be64fd677b4
#: ../src/Doc/c-api/veryhigh.rst:199
msgid ""
"This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving "
"*closeit* set to ``0`` and *flags* set to *NULL*."
msgstr ""
# 2d1be7ec5a3047ab9726cc0cf0ff8cd9
#: ../src/Doc/c-api/veryhigh.rst:205
msgid ""
"This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving "
"*flags* set to *NULL*."
msgstr ""
# 8e280ccf10b34f46ab9884949fe6f447
#: ../src/Doc/c-api/veryhigh.rst:211
msgid ""
"This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving "
"*closeit* set to ``0``."
msgstr ""
# a801e363dce44aac9d45e4f0a59ff5cc
#: ../src/Doc/c-api/veryhigh.rst:217
msgid ""
"Similar to :c:func:`PyRun_StringFlags`, but the Python source code is read "
"from *fp* instead of an in-memory string. *filename* should be the name of "
"the file. If *closeit* is true, the file is closed before :c:func:"
"`PyRun_FileExFlags` returns."
msgstr ""
# aa61b6200d5d4b088aa516a5e76624b4
#: ../src/Doc/c-api/veryhigh.rst:225
msgid ""
"This is a simplified interface to :c:func:`Py_CompileStringFlags` below, "
"leaving *flags* set to *NULL*."
msgstr ""
# a920a66528284a40937780121c8630f4
#: ../src/Doc/c-api/veryhigh.rst:231
msgid ""
"Parse and compile the Python source code in *str*, returning the resulting "
"code object. The start token is given by *start*; this can be used to "
"constrain the code which can be compiled and should be :const:"
"`Py_eval_input`, :const:`Py_file_input`, or :const:`Py_single_input`. The "
"filename specified by *filename* is used to construct the code object and "
"may appear in tracebacks or :exc:`SyntaxError` exception messages. This "
"returns *NULL* if the code cannot be parsed or compiled."
msgstr ""
# cad21fcd56064456a081785921867007
#: ../src/Doc/c-api/veryhigh.rst:242
msgid ""
"This is a simplified interface to :c:func:`PyEval_EvalCodeEx`, with just the "
"code object, and the dictionaries of global and local variables. The other "
"arguments are set to *NULL*."
msgstr ""
# 59e7b09accfe463facba41a451b73c34
#: ../src/Doc/c-api/veryhigh.rst:249
msgid ""
"Evaluate a precompiled code object, given a particular environment for its "
"evaluation. This environment consists of dictionaries of global and local "
"variables, arrays of arguments, keywords and defaults, and a closure tuple "
"of cells."
msgstr ""
# 423e94fb239248038df9e1978cc5df86
#: ../src/Doc/c-api/veryhigh.rst:257
msgid ""
"Evaluate an execution frame. This is a simplified interface to "
"PyEval_EvalFrameEx, for backward compatibility."
msgstr ""
# 165cbb695a0249c5942b8b738abd5348
#: ../src/Doc/c-api/veryhigh.rst:263
msgid ""
"This is the main, unvarnished function of Python interpretation. It is "
"literally 2000 lines long. The code object associated with the execution "
"frame *f* is executed, interpreting bytecode and executing calls as needed. "
"The additional *throwflag* parameter can mostly be ignored - if true, then "
"it causes an exception to immediately be thrown; this is used for the :meth:"
"`~generator.throw` methods of generator objects."
msgstr ""
# 80e719939c1045cbb8e923aef2840268
#: ../src/Doc/c-api/veryhigh.rst:273
msgid ""
"This function changes the flags of the current evaluation frame, and returns "
"true on success, false on failure."
msgstr ""
# a745662ec3e0425aab95516ae1f81ec8
#: ../src/Doc/c-api/veryhigh.rst:281
msgid ""
"The start symbol from the Python grammar for isolated expressions; for use "
"with :c:func:`Py_CompileString`."
msgstr ""
# 281b214eceed4af1b1d7a0b5f721648f
#: ../src/Doc/c-api/veryhigh.rst:289
msgid ""
"The start symbol from the Python grammar for sequences of statements as read "
"from a file or other source; for use with :c:func:`Py_CompileString`. This "
"is the symbol to use when compiling arbitrarily long Python source code."
msgstr ""
# 3dda59b384c1440b8c1a94c510daf193
#: ../src/Doc/c-api/veryhigh.rst:298
msgid ""
"The start symbol from the Python grammar for a single statement; for use "
"with :c:func:`Py_CompileString`. This is the symbol used for the interactive "
"interpreter loop."
msgstr ""
# e44e68fed03742719d62685e6d474ebe
#: ../src/Doc/c-api/veryhigh.rst:305
msgid ""
"This is the structure used to hold compiler flags. In cases where code is "
"only being compiled, it is passed as ``int flags``, and in cases where code "
"is being executed, it is passed as ``PyCompilerFlags *flags``. In this "
"case, ``from __future__ import`` can modify *flags*."
msgstr ""
# cfe97e326d03495e91550b0e5a1eb401
#: ../src/Doc/c-api/veryhigh.rst:310
msgid ""
"Whenever ``PyCompilerFlags *flags`` is *NULL*, :attr:`cf_flags` is treated "
"as equal to ``0``, and any modification due to ``from __future__ import`` is "
"discarded. ::"
msgstr ""
# af1d88420d37494faf32c517a60f5df4
#: ../src/Doc/c-api/veryhigh.rst:321
msgid ""
"This bit can be set in *flags* to cause division operator ``/`` to be "
"interpreted as \"true division\" according to :pep:`238`."
msgstr ""
#: ../src/Doc/c-api/weakref.rst:6
msgid "Weak Reference Objects"
msgstr ""
#: ../src/Doc/c-api/weakref.rst:8
msgid ""
"Python supports *weak references* as first-class objects. There are two "
"specific object types which directly implement weak references. The first "
"is a simple reference object, and the second acts as a proxy for the "
"original object as much as it can."
msgstr ""
# 878afd97f0f24874858bb58f649ca987
#: ../src/Doc/c-api/weakref.rst:16
msgid "Return true if *ob* is either a reference or proxy object."
msgstr ""
# b40fb1c223fd476396f8c58a228ff27b
#: ../src/Doc/c-api/weakref.rst:23
msgid "Return true if *ob* is a reference object."
msgstr ""
# c1cf65de394240d5975cc9f3dead6d76
#: ../src/Doc/c-api/weakref.rst:30
msgid "Return true if *ob* is a proxy object."
msgstr ""
# 80e6e79af01143a58bb7bc6d1422041a
#: ../src/Doc/c-api/weakref.rst:37
msgid ""
"Return a weak reference object for the object *ob*. This will always return "
"a new reference, but is not guaranteed to create a new object; an existing "
"reference object may be returned. The second parameter, *callback*, can be "
"a callable object that receives notification when *ob* is garbage collected; "
"it should accept a single parameter, which will be the weak reference object "
"itself. *callback* may also be ``None`` or *NULL*. If *ob* is not a weakly-"
"referencable object, or if *callback* is not callable, ``None``, or *NULL*, "
"this will return *NULL* and raise :exc:`TypeError`."
msgstr ""
# 1e21a3695098455d912211e846f6fc3b
#: ../src/Doc/c-api/weakref.rst:51
msgid ""
"Return a weak reference proxy object for the object *ob*. This will always "
"return a new reference, but is not guaranteed to create a new object; an "
"existing proxy object may be returned. The second parameter, *callback*, "
"can be a callable object that receives notification when *ob* is garbage "
"collected; it should accept a single parameter, which will be the weak "
"reference object itself. *callback* may also be ``None`` or *NULL*. If *ob* "
"is not a weakly-referencable object, or if *callback* is not callable, "
"``None``, or *NULL*, this will return *NULL* and raise :exc:`TypeError`."
msgstr ""
# a2480df5d77e441cbf0a030defcd9e63
#: ../src/Doc/c-api/weakref.rst:65
msgid ""
"Return the referenced object from a weak reference, *ref*. If the referent "
"is no longer live, returns :const:`Py_None`."
msgstr ""
# 324f41560b0447f0bd584b7f1bc9a3b0
#: ../src/Doc/c-api/weakref.rst:72
msgid ""
"This function returns a **borrowed reference** to the referenced object. "
"This means that you should always call :c:func:`Py_INCREF` on the object "
"except if you know that it cannot be destroyed while you are still using it."
msgstr ""
# 2cf0cb358281422080803ea291ee0601
#: ../src/Doc/c-api/weakref.rst:80
msgid ""
"Similar to :c:func:`PyWeakref_GetObject`, but implemented as a macro that "
"does no error checking."
msgstr ""
#~ msgid "See also"
#~ msgstr "Voir aussi"
#~ msgid "To allocate and create extension modules."
#~ msgstr "Allouer et créer des modules d'extension."
#~ msgid "Parsing arguments"
#~ msgstr "Analyse des arguments"
#~ msgid "Strings and buffers"
#~ msgstr "Chaînes et tampons"
#~ msgid "Unless otherwise stated, buffers are not NUL-terminated."
#~ msgstr "Sauf indication contraire, les tampons ne se terminent pas par NUL."
#~ msgid ""
#~ "This format does not accept bytes-like objects. If you want to accept "
#~ "filesystem paths and convert them to C character strings, it is "
#~ "preferrable to use the ``O&`` format with :cfunc:`PyUnicode_FSConverter` "
#~ "as *converter*."
#~ msgstr ""
#~ "Ce format n'accepte pas les objets de type octets. Si vous voulez "
#~ "accepter des chemins de fichiers et les convertir en chaînes de "
#~ "caractères C, il vaut mieux utiliser le format ``O&`` avec :cfunc:"
#~ "`PyUnicode_FSConverter` comme *convertisseur*."
#~ msgid ""
#~ "This format accepts Unicode objects as well as objects supporting the "
#~ "buffer protocol. It fills a :ctype:`Py_buffer` structure provided by the "
#~ "caller. In this case the resulting C string may contain embedded NUL "
#~ "bytes. Unicode objects are converted to C strings using ``'utf-8'`` "
#~ "encoding."
#~ msgstr ""
#~ "Ce format accepte aussi bien les objets Unicode que des objets supportant "
#~ "le protocole de mémoire tampon.Il remplit une structure :ctype:"
#~ "`Py_buffer` fournie par l'appelant. Dans ce cas, La chaîne C qui en "
#~ "résulte peut contenir des octets NUL. Les objets Unicode sont convertis "
#~ "en chaînes C en utilisant un encodage ``'utf-8' ``."
#~ msgid ""
#~ "Like ``s*``, except that it doesn't accept mutable buffer-like objects "
#~ "such as :class:`bytearray`. The result is stored into two C variables, "
#~ "the first one a pointer to a C string, the second one its length. The "
#~ "string may contain embedded null bytes. Unicode objects are converted to "
#~ "C strings using ``'utf-8'`` encoding."
#~ msgstr ""
#~ "Comme ``s*``, excepté qu'il n'accepte pas d'objets de type tampons "
#~ "mutables, comme :class:`bytearray`. Le résultat est stocké dans deux "
#~ "variables C, la première étant un pointeur sur une chaîne de caractères "
#~ "C, la seconde étant sa longueur. La chaîne de caractère peut contenir des "
#~ "octets nuls. Les objets Unicode sont convertis en chaînes de caractères C "
#~ "avec l'encodage ``'utf-8'``."
#~ msgid ""
#~ "Like ``s*``, but the Python object may also be ``None``, in which case "
#~ "the ``buf`` member of the :ctype:`Py_buffer` structure is set to *NULL*."
#~ msgstr ""
#~ "Comme ``s*``, mais l'objet Python peut aussi être ``None``, dans ce cas "
#~ "le champ ``buf`` de la structure :ctype:`Py_buffer` est définie à *NULL*."
#~ msgid ""
#~ "Like ``s#``, but the Python object may also be ``None``, in which case "
#~ "the C pointer is set to *NULL*."
#~ msgstr ""
#~ "Comme ``s#``, mais l'objet Python peut également être ``None``, dans ce "
#~ "cas le pointeur C est définie à *NULL*."
#~ msgid ""
#~ "This format converts a bytes-like object to a C pointer to a character "
#~ "string; it does not accept Unicode objects. The bytes buffer must not "
#~ "contain embedded NUL bytes; if it does, a :exc:`TypeError` exception is "
#~ "raised."
#~ msgstr ""
#~ "Ce format converti un objet contenant des octets en un pointeur C sur une "
#~ "chaîne de caractères, il n'accepte pas d'objets Unicode. Le buffer ne "
#~ "doit pas contenir d'octets NUL ; s'il en contient, une exception :exc:"
#~ "`TypeError` sera levée."
#~ msgid ""
#~ "This variant on ``s*`` doesn't accept Unicode objects, only objects "
#~ "supporting the buffer protocol. **This is the recommended way to accept "
#~ "binary data.**"
#~ msgstr ""
#~ "Cette variante sur ``s*`` n'accepte pas d'objets Unicode, seulement des "
#~ "objets supportant le protocole buffer. **C'est le moyen recommandé pour "
#~ "accepter des données binaires.**"
#~ msgid ""
#~ "This variant on ``s#`` doesn't accept Unicode objects, only bytes-like "
#~ "objects."
#~ msgstr ""
#~ "Cette variante de ``s#`` n'accepte pas les objets Unicode, uniquement des "
#~ "objets assimilés à des octets."
#~ msgid ""
#~ "Requires that the Python object is a :class:`bytes` object, without "
#~ "attempting any conversion. Raises :exc:`TypeError` if the object is not "
#~ "a bytes object. The C variable may also be declared as :ctype:`PyObject"
#~ "\\*`."
#~ msgstr ""
#~ "Nécessite que l'objet Python soit un objet class:`bytes`, sans tenter de "
#~ "faire aucune conversion au préalable. Si l'objet n'est pas un objet de "
#~ "type octets, une exception :exc:`TypeError` sera levée. La variable C "
#~ "peut également être de type :ctype:`PyObject\\*`."
#~ msgid ""
#~ "Requires that the Python object is a :class:`bytearray` object, without "
#~ "attempting any conversion. Raises :exc:`TypeError` if the object is not "
#~ "a :class:`bytearray` object. The C variable may also be declared as :"
#~ "ctype:`PyObject\\*`."
#~ msgstr ""
#~ "Nécessite que l'objet Python soit un objet :class:`bytearray`, sans "
#~ "tenter de faire aucune conversion. Si l'objet n'est pas un objet de type :"
#~ "class:`bytearray`, une exception :exc:`TypeError` sera levée. La variable "
#~ "C peut aussi être de type :ctype:`PyObject\\*`."
#~ msgid ""
#~ "Convert a Python Unicode object to a C pointer to a NUL-terminated buffer "
#~ "of Unicode characters. You must pass the address of a :ctype:"
#~ "`Py_UNICODE` pointer variable, which will be filled with the pointer to "
#~ "an existing Unicode buffer. Please note that the width of a :ctype:"
#~ "`Py_UNICODE` character depends on compilation options (it is either 16 or "
#~ "32 bits). The Python string must not contain embedded NUL characters; if "
#~ "it does, a :exc:`TypeError` exception is raised."
#~ msgstr ""
#~ "Converti un objet Python Unicode en un pointeur C sur un tampon terminé "
#~ "par NUL de caractères Unicode. Vous devez fournir l'adresse d'une "
#~ "variable pointant sur un :ctype:`Py_UNICODE`, qui sera rempli avec le "
#~ "pointeur sur un tampon Unicode existant. Notez que la taille d'un "
#~ "caractère :ctype:`Py_UNICODE` dépend des options choisies à la "
#~ "compilation (16 ou 32 bits). La chaîne de caractères Python ne doit pas "
#~ "contenir de caractères NUL, sinon une exception :exc:`TypeError` sera "
#~ "levée."
#~ msgid ""
#~ "Since ``u`` doesn't give you back the length of the string, and it may "
#~ "contain embedded NUL characters, it is recommended to use ``u#`` or ``U`` "
#~ "instead."
#~ msgstr ""
#~ "Comme ``u`` ne vous donne pas en retour la longueur de la chaîne, et "
#~ "comme il peut contenir des caractères NUL, il est recommandé d'utiliser à "
#~ "la place ``u#`` ou ``U``."
#~ msgid ""
#~ "Like ``u``, but the Python object may also be ``None``, in which case "
#~ "the :ctype:`Py_UNICODE` pointer is set to *NULL*."
#~ msgstr ""
#~ "Comme ``u``, mais l'objet Python peut aussi être ``None``, auquel cas le "
#~ "pointeur :ctype:`Py_UNICODE` est fixé à *NULL*."
#~ msgid ""
#~ "Like ``u#``, but the Python object may also be ``None``, in which case "
#~ "the :ctype:`Py_UNICODE` pointer is set to *NULL*."
#~ msgstr ""
#~ "Comme ``u#``, mais l'objet Python peut également être ``None``, auquel "
#~ "cas le pointeur :ctype:`Py_UNICODE` est fixé à *NULL*."
#~ msgid ""
#~ "This format accepts any object which implements the read-write buffer "
#~ "interface. It fills a :ctype:`Py_buffer` structure provided by the "
#~ "caller. The buffer may contain embedded null bytes. The caller have to "
#~ "call :cfunc:`PyBuffer_Release` when it is done with the buffer."
#~ msgstr ""
#~ "Ce format accepte n'importe quel objet qui implémente l'interface de "
#~ "mémoire tampon en lecture/écriture. Il remplit une structure :ctype:"
#~ "`Py_buffer` fournie par l'appelant. Le tampon peut contenir des octets "
#~ "nuls. L'appelant doit appeler :cfunc:`PyBuffer_Release` quand il n'a plus "
#~ "l'usage du tampon."
#~ msgid ""
#~ "Convert a Python byte, represented as a :class:`bytes` object of length "
#~ "1, to a C :ctype:`char`."
#~ msgstr ""
#~ "Convertit un octet Python, représenté comme un objet :class:`bytes` de "
#~ "longueur 1, en un type C :ctype:`char`."
#~ msgid "status = converter(object, address);"
#~ msgstr "status = conversion(objet, adresse);"
#~ msgid ""
#~ "If the *converter* returns Py_CLEANUP_SUPPORTED, it may get called a "
#~ "second time if the argument parsing eventually fails, giving the "
#~ "converter a chance to release any memory that it had already allocated. "
#~ "In this second call, the *object* parameter will be NULL; *address* will "
#~ "have the same value as in the original call."
#~ msgstr ""
#~ "Si la fonction de *conversion* retourne Py_CLEANUP_SUPPORTED, elle peut "
#~ "être appelée une seconde fois si l'analyse des arguments échoue, donnant "
#~ "ainsi à la fonction de conversion la possibilité de libérer la mémoire "
#~ "qu'elle avait allouée précédemment. Dans ce second appel, le paramètre "
#~ "correspondant à l'*objet* sera NULL; *adresse* aura la même valeur que "
#~ "dans le premier appel."
#~ msgid "Building values"
#~ msgstr "Construction des valeurs"
#~ msgid "Buffer Objects"
#~ msgstr "Les objets tampons"