@@ -25,7 +25,7 @@ msgstr ""
25
25
26
26
#: ../../library/dbm.rst:2
27
27
msgid ":mod:`!dbm` --- Interfaces to Unix \" databases\" "
28
- msgstr ""
28
+ msgstr ":mod:`!dbm` --- Interfaces para \" banco de dados \" Unix "
29
29
30
30
#: ../../library/dbm.rst:7
31
31
msgid "**Source code:** :source:`Lib/dbm/__init__.py`"
@@ -46,6 +46,9 @@ msgid ""
46
46
"supported modules, with a unique exception also named :exc:`dbm.error` as "
47
47
"the first item --- the latter is used when :exc:`dbm.error` is raised."
48
48
msgstr ""
49
+ "Uma tupla contendo as exceções que podem ser levantadas por cada um dos "
50
+ "módulos suportados, com a única exceção também chamada :exc:`dbm.error` como "
51
+ "o primeiro item --- o último é usado quando :exc:`dbm.error` é levantada."
49
52
50
53
#: ../../library/dbm.rst:27
51
54
msgid ""
@@ -56,30 +59,35 @@ msgstr ""
56
59
57
60
#: ../../library/dbm.rst:31
58
61
msgid "Return one of the following values:"
59
- msgstr ""
62
+ msgstr "Retorna um dos seguintes valores: "
60
63
61
64
#: ../../library/dbm.rst:33
62
65
msgid ""
63
66
"``None`` if the file can't be opened because it's unreadable or doesn't exist"
64
67
msgstr ""
68
+ "``None`` se o arquivo não puder ser aberto porque está ilegível ou não existe"
65
69
66
70
#: ../../library/dbm.rst:34
67
71
msgid "the empty string (``''``) if the file's format can't be guessed"
68
72
msgstr ""
73
+ "a string vazia (``''``) se o formato do arquivo não puder ser adivinhado"
69
74
70
75
#: ../../library/dbm.rst:35
71
76
msgid ""
72
77
"a string containing the required module name, such as ``'dbm.ndbm'`` or "
73
78
"``'dbm.gnu'``"
74
79
msgstr ""
80
+ "uma string contendo o nome do módulo necessário, tal como ``'dbm.ndbm'`` ou "
81
+ "``'dbm.gnu'``"
75
82
76
83
#: ../../library/dbm.rst:37 ../../library/dbm.rst:202 ../../library/dbm.rst:386
77
84
msgid "*filename* accepts a :term:`path-like object`."
78
- msgstr ""
85
+ msgstr "*filename* aceita um :term:`objeto caminho ou similar`. "
79
86
80
87
#: ../../library/dbm.rst:61
81
88
msgid "Open a database and return the corresponding database object."
82
89
msgstr ""
90
+ "Abre um banco de dados e retorna o objeto banco de dados correspondendo."
83
91
84
92
#: ../../library/dbm.rst:0
85
93
msgid "Parameters"
@@ -92,50 +100,59 @@ msgid ""
92
100
"is used; if it does not exist, the first submodule listed above that can be "
93
101
"imported is used."
94
102
msgstr ""
103
+ "O arquivo de banco de dados para abrir. Se o arquivo de banco de dados já "
104
+ "existe, a função :func:`whichdb` é usada para determinar seu tipo e o módulo "
105
+ "apropriado é usado; se ele não existir, o primeiro submódulo listado acima "
106
+ "que pode ser importado é usado."
95
107
96
108
#: ../../library/dbm.rst:64 ../../library/dbm.rst:174
97
109
msgid "The database file to open."
98
- msgstr ""
110
+ msgstr "O arquivo de banco de dados para abrir. "
99
111
100
112
#: ../../library/dbm.rst:66
101
113
msgid ""
102
114
"If the database file already exists, the :func:`whichdb` function is used to "
103
115
"determine its type and the appropriate module is used; if it does not exist, "
104
116
"the first submodule listed above that can be imported is used."
105
117
msgstr ""
118
+ "Se o arquivo de banco de dados já existe, a função :func:`whichdb` é usada "
119
+ "para determinar seu tipo e o módulo apropriado é usado; se ele não existir, "
120
+ "o primeiro submódulo listado acima que pode ser importado é usado."
106
121
107
122
#: ../../library/dbm.rst:71 ../../library/dbm.rst:297
108
123
msgid ""
109
124
"* ``'r'`` (default): |flag_r| * ``'w'``: |flag_w| * ``'c'``: |flag_c| * "
110
125
"``'n'``: |flag_n|"
111
126
msgstr ""
127
+ "* ``'r'`` (padrão): |flag_r| * ``'w'``: |flag_w| * ``'c'``: |flag_c| * "
128
+ "``'n'``: |flag_n|"
112
129
113
130
#: ../../library/dbm.rst:72 ../../library/dbm.rst:179 ../../library/dbm.rst:298
114
131
msgid "``'r'`` (default): |flag_r|"
115
- msgstr ""
132
+ msgstr "``'r'`` (padrão): |flag_r| "
116
133
117
134
#: ../../library/dbm.rst:73 ../../library/dbm.rst:180 ../../library/dbm.rst:299
118
135
#: ../../library/dbm.rst:367
119
136
msgid "``'w'``: |flag_w|"
120
- msgstr ""
137
+ msgstr "``'w'``: |flag_w| "
121
138
122
139
#: ../../library/dbm.rst:74 ../../library/dbm.rst:181 ../../library/dbm.rst:300
123
140
msgid "``'c'``: |flag_c|"
124
- msgstr ""
141
+ msgstr "``'c'``: |flag_c| "
125
142
126
143
#: ../../library/dbm.rst:75 ../../library/dbm.rst:182 ../../library/dbm.rst:301
127
144
#: ../../library/dbm.rst:369
128
145
msgid "``'n'``: |flag_n|"
129
- msgstr ""
146
+ msgstr "``'n'``: |flag_n| "
130
147
131
148
#: ../../library/dbm.rst:77 ../../library/dbm.rst:196 ../../library/dbm.rst:303
132
149
#: ../../library/dbm.rst:371
133
150
msgid "|mode_param_doc|"
134
- msgstr ""
151
+ msgstr "|mode_param_doc| "
135
152
136
153
#: ../../library/dbm.rst:80
137
154
msgid "*file* accepts a :term:`path-like object`."
138
- msgstr ""
155
+ msgstr "*file* aceita um :term:`objeto caminho ou similar`. "
139
156
140
157
#: ../../library/dbm.rst:83
141
158
msgid ""
@@ -145,43 +162,61 @@ msgid ""
145
162
"`!keys` method are available, as well as :meth:`!get` and :meth:`!"
146
163
"setdefault` methods."
147
164
msgstr ""
165
+ "O objeto retornado por :func:`~dbm.open` oferece suporte à mesma "
166
+ "funcionalidade básica que um :class:`dict`; chaves e seus valores "
167
+ "correspondentes podem ser armazenados, obtidos e excluídos, e o operador :"
168
+ "keyword:`in` e o método :meth:`!keys` estão disponíveis, bem como métodos :"
169
+ "meth:`!get` e :meth:`!setdefault`."
148
170
149
171
#: ../../library/dbm.rst:88
150
172
msgid ""
151
173
"Key and values are always stored as :class:`bytes`. This means that when "
152
174
"strings are used they are implicitly converted to the default encoding "
153
175
"before being stored."
154
176
msgstr ""
177
+ "Chaves e valores são sempre armazenados como :class:`bytes`. Isso significa "
178
+ "que quando strings são usadas, elas são implicitamente convertidas para a "
179
+ "codificação padrão antes de serem armazenadas."
155
180
156
181
#: ../../library/dbm.rst:92
157
182
msgid ""
158
183
"These objects also support being used in a :keyword:`with` statement, which "
159
184
"will automatically close them when done."
160
185
msgstr ""
186
+ "Estes objetos também oferecem suporte a serem usados em uma instrução :"
187
+ "keyword:`with`, que vai fechar automaticamente fechá-los quando concluída."
161
188
162
189
#: ../../library/dbm.rst:95
163
190
msgid ""
164
191
":meth:`!get` and :meth:`!setdefault` methods are now available for all :mod:"
165
192
"`dbm` backends."
166
193
msgstr ""
194
+ "O métodos :meth:`!get` e :meth:`!setdefault` são agora disponíveis para "
195
+ "todos os backends do :mod:`dbm`."
167
196
168
197
#: ../../library/dbm.rst:99
169
198
msgid ""
170
199
"Added native support for the context management protocol to the objects "
171
200
"returned by :func:`~dbm.open`."
172
201
msgstr ""
202
+ "Adicionado suporte nativo para o protocolo de gerenciamento de contexto para "
203
+ "os objetos retornados por :func:`~dbm.open`."
173
204
174
205
#: ../../library/dbm.rst:103
175
206
msgid ""
176
207
"Deleting a key from a read-only database raises a database module specific "
177
208
"exception instead of :exc:`KeyError`."
178
209
msgstr ""
210
+ "Excluir uma chave de um banco de dados somente leitura levanta uma exceção "
211
+ "de banco de dados específica do módulo em vez de :exc:`KeyError`."
179
212
180
213
#: ../../library/dbm.rst:107
181
214
msgid ""
182
215
"The following example records some hostnames and a corresponding title, and "
183
216
"then prints out the contents of the database::"
184
217
msgstr ""
218
+ "Os seguintes exemplos registram alguns hostnames e um título correspondente, "
219
+ "e então exibe o conteúdo do banco de dados::"
185
220
186
221
#: ../../library/dbm.rst:110
187
222
msgid ""
@@ -209,18 +244,41 @@ msgid ""
209
244
"\n"
210
245
"# db is automatically closed when leaving the with statement."
211
246
msgstr ""
247
+ "import dbm\n"
248
+ "\n"
249
+ "# Abre o banco de dados, criando-o se necessário.\n"
250
+ "with dbm.open('cache', 'c') as db:\n"
251
+ "\n"
252
+ " # Registra alguns valores\n"
253
+ " db[b'hello'] = b'there'\n"
254
+ " db['www.python.org'] = 'Python Website'\n"
255
+ " db['www.cnn.com'] = 'Cable News Network'\n"
256
+ "\n"
257
+ " # Note que as chaves são consideradas bytes agora.\n"
258
+ " assert db[b'www.python.org'] == b'Python Website'\n"
259
+ " # Observe como o valor é agora em bytes.\n"
260
+ " assert db['www.cnn.com'] == b'Cable News Network'\n"
261
+ "\n"
262
+ " # Métodos geralmente usados da interface dict funcionam também.\n"
263
+ " print(db.get('python.org', b'not present'))\n"
264
+ "\n"
265
+ " # Armazenar uma chave não-string ou valor vai levantar uma exceção\n"
266
+ " # (provavelmente uma TypeError).\n"
267
+ " db['www.yahoo.com'] = 4\n"
268
+ "\n"
269
+ "# db é automaticamente fechado a sair da instrução with."
212
270
213
271
#: ../../library/dbm.rst:137
214
272
msgid "Module :mod:`shelve`"
215
273
msgstr "Módulo :mod:`shelve`"
216
274
217
275
#: ../../library/dbm.rst:138
218
276
msgid "Persistence module which stores non-string data."
219
- msgstr ""
277
+ msgstr "Módulo persistente que armazena dados não-string. "
220
278
221
279
#: ../../library/dbm.rst:141
222
280
msgid "The individual submodules are described in the following sections."
223
- msgstr ""
281
+ msgstr "Os submódulos individuais são descritos nas seções a seguir. "
224
282
225
283
#: ../../library/dbm.rst:145
226
284
msgid ":mod:`dbm.gnu` --- GNU database manager"
0 commit comments