99# Alexsandro Matias de Almeida <matiasalexsandro@gmail.com>, 2020
1010# mvpetri <mvpetri@gmail.com>, 2021
1111# Rafael Fontenelle <rffontenelle@gmail.com>, 2023
12+ # Pedro Fonini, 2024
1213#
1314#, fuzzy
1415msgid ""
1516msgstr ""
1617"Project-Id-Version :Python 3.8\n "
1718"Report-Msgid-Bugs-To :\n "
18- "POT-Creation-Date :2024-08-31 13:50 +0000\n "
19+ "POT-Creation-Date :2024-10-04 17:06 +0000\n "
1920"PO-Revision-Date :2020-05-30 11:53+0000\n "
20- "Last-Translator :Rafael Fontenelle <rffontenelle@gmail.com>, 2023 \n "
21+ "Last-Translator :Pedro Fonini, 2024 \n "
2122"Language-Team :Portuguese (Brazil) (https://app.transifex.com/python-doc/ "
2223"teams/5390/pt_BR/)\n "
2324"MIME-Version :1.0\n "
@@ -117,17 +118,28 @@ msgid ""
117118"func:`PyRun_String`; see the source for :c:func:`PyRun_SimpleString` in "
118119"``Python/pythonrun.c``."
119120msgstr ""
121+ "A função mais alto-nível para isso é a :c:func:`PyRun_SimpleString`, que "
122+ "recebe como único argumento uma string a ser executada no contexto do módulo "
123+ "``__main__`` e retorna ``0`` para sucesso e ``-1`` quando uma exceção "
124+ "ocorrer (incluindo :exc:`SyntaxError`). Se quiser mais controle, use :c:"
125+ "func:`PyRun_String`; veja o código-fonte de :c:func:`PyRun_SimpleString` em "
126+ "``Python/pythonrun.c``."
120127
121128#: ../../faq/extending.rst:72
122129msgid "How can I evaluate an arbitrary Python expression from C?"
123130msgstr ""
131+ "Como posso executar e obter o resultado de uma expressão Python arbitrária a "
132+ "partir de C?"
124133
125134#: ../../faq/extending.rst:74
126135msgid ""
127136"Call the function :c:func:`PyRun_String` from the previous question with the "
128137"start symbol :c:data:`Py_eval_input`; it parses an expression, evaluates it "
129138"and returns its value."
130139msgstr ""
140+ "Chame a função :c:func:`PyRun_String` da pergunta anterior passando :c:data:"
141+ "`Py_eval_input` como o símbolo de início; ela faz a análise sintática de uma "
142+ "expressão, a executa, e retorna o seu valor."
131143
132144#: ../../faq/extending.rst:80
133145msgid "How do I extract C values from a Python object?"
@@ -155,6 +167,9 @@ msgid ""
155167"use :c:func:`PyBytes_Check`, :c:func:`PyTuple_Check`, :c:func:"
156168"`PyList_Check`, etc."
157169msgstr ""
170+ "Para testar o tipo de um objeto, primeiramente se certifique de que ele não "
171+ "é ``NULL``, e então use :c:func:`PyBytes_Check`, :c:func:`PyTuple_Check`, :c:"
172+ "func:`PyList_Check`, etc."
158173
159174#: ../../faq/extending.rst:95
160175msgid ""
@@ -165,6 +180,12 @@ msgid ""
165180"as many other useful protocols such as numbers (:c:func:`PyNumber_Index` et "
166181"al.) and mappings in the PyMapping APIs."
167182msgstr ""
183+ "Também existe uma API alto-nível para objetos Python fornecida pela chamada "
184+ "interface\" abstrata\" -- leia ``Include/abstract.h`` para mais detalhes. "
185+ "Ela permite interagir com qualquer tipo de sequência Python usando chamadas "
186+ "como :c:func:`PySequence_Length`, :c:func:`PySequence_GetItem`, etc, além de "
187+ "vários outros protocolos úteis tais como números (:c:func:`PyNumber_Index` e "
188+ "outros) e mapeamentos nas APIs PyMapping."
168189
169190#: ../../faq/extending.rst:104
170191msgid "How do I use Py_BuildValue() to create a tuple of arbitrary length?"
@@ -174,11 +195,11 @@ msgstr ""
174195
175196#: ../../faq/extending.rst:106
176197msgid "You can't. Use :c:func:`PyTuple_Pack` instead."
177- msgstr ""
198+ msgstr "Não é possível. Use a função :c:func:`PyTuple_Pack` para isso. "
178199
179200#: ../../faq/extending.rst:110
180201msgid "How do I call an object's method from C?"
181- msgstr ""
202+ msgstr "Como eu chamo um método de um objeto a partir do C? "
182203
183204#: ../../faq/extending.rst:112
184205msgid ""
@@ -187,13 +208,20 @@ msgid ""
187208"to call, a format string like that used with :c:func:`Py_BuildValue`, and "
188209"the argument values::"
189210msgstr ""
211+ "A função :c:func:`PyObject_CallMethod` pode ser usada para chamar um método "
212+ "arbitrário de um objeto. Os parâmetros são o objeto, o nome do método a ser "
213+ "chamado, uma string de formato como a usada na :c:func:`Py_BuildValue`, e os "
214+ "valores dos argumentos::"
190215
191216#: ../../faq/extending.rst:121
192217msgid ""
193218"This works for any object that has methods -- whether built-in or user-"
194219"defined. You are responsible for eventually :c:func:`Py_DECREF`\\ 'ing the "
195220"return value."
196221msgstr ""
222+ "Isso funciona para qualquer objeto que tenha métodos -- sejam eles embutidos "
223+ "ou definidos por usuário. Você fica então responsável por chamar :c:func:"
224+ "`Py_DECREF` no valor retornado."
197225
198226#: ../../faq/extending.rst:124
199227msgid ""