9
9
# Alexsandro Matias de Almeida <[email protected] >, 2020
10
10
# mvpetri <[email protected] >, 2021
11
11
# Rafael Fontenelle <[email protected] >, 2023
12
+ # Pedro Fonini, 2024
12
13
#
13
14
#, fuzzy
14
15
msgid ""
15
16
msgstr ""
16
17
"Project-Id-Version : Python 3.8\n "
17
18
"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 "
19
20
"PO-Revision-Date : 2020-05-30 11:53+0000\n "
20
- "
Last-Translator :
Rafael Fontenelle <[email protected] >, 2023 \n"
21
+ "Last-Translator : Pedro Fonini, 2024 \n "
21
22
"Language-Team : Portuguese (Brazil) (https://app.transifex.com/python-doc/ "
22
23
"teams/5390/pt_BR/)\n "
23
24
"MIME-Version : 1.0\n "
@@ -117,17 +118,28 @@ msgid ""
117
118
"func:`PyRun_String`; see the source for :c:func:`PyRun_SimpleString` in "
118
119
"``Python/pythonrun.c``."
119
120
msgstr ""
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``."
120
127
121
128
#: ../../faq/extending.rst:72
122
129
msgid "How can I evaluate an arbitrary Python expression from C?"
123
130
msgstr ""
131
+ "Como posso executar e obter o resultado de uma expressão Python arbitrária a "
132
+ "partir de C?"
124
133
125
134
#: ../../faq/extending.rst:74
126
135
msgid ""
127
136
"Call the function :c:func:`PyRun_String` from the previous question with the "
128
137
"start symbol :c:data:`Py_eval_input`; it parses an expression, evaluates it "
129
138
"and returns its value."
130
139
msgstr ""
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."
131
143
132
144
#: ../../faq/extending.rst:80
133
145
msgid "How do I extract C values from a Python object?"
@@ -155,6 +167,9 @@ msgid ""
155
167
"use :c:func:`PyBytes_Check`, :c:func:`PyTuple_Check`, :c:func:"
156
168
"`PyList_Check`, etc."
157
169
msgstr ""
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."
158
173
159
174
#: ../../faq/extending.rst:95
160
175
msgid ""
@@ -165,6 +180,12 @@ msgid ""
165
180
"as many other useful protocols such as numbers (:c:func:`PyNumber_Index` et "
166
181
"al.) and mappings in the PyMapping APIs."
167
182
msgstr ""
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."
168
189
169
190
#: ../../faq/extending.rst:104
170
191
msgid "How do I use Py_BuildValue() to create a tuple of arbitrary length?"
@@ -174,11 +195,11 @@ msgstr ""
174
195
175
196
#: ../../faq/extending.rst:106
176
197
msgid "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. "
178
199
179
200
#: ../../faq/extending.rst:110
180
201
msgid "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? "
182
203
183
204
#: ../../faq/extending.rst:112
184
205
msgid ""
@@ -187,13 +208,20 @@ msgid ""
187
208
"to call, a format string like that used with :c:func:`Py_BuildValue`, and "
188
209
"the argument values::"
189
210
msgstr ""
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::"
190
215
191
216
#: ../../faq/extending.rst:121
192
217
msgid ""
193
218
"This works for any object that has methods -- whether built-in or user-"
194
219
"defined. You are responsible for eventually :c:func:`Py_DECREF`\\ 'ing the "
195
220
"return value."
196
221
msgstr ""
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."
197
225
198
226
#: ../../faq/extending.rst:124
199
227
msgid ""
0 commit comments