@@ -335,6 +335,9 @@ msgid ""
335
335
"with data from *iterable*. If *iterable* is not specified, the new deque is"
336
336
" empty."
337
337
msgstr ""
338
+ "Retorna um novo objeto deque inicializado da esquerda para a direita "
339
+ "(usando: meth: `append`) com dados de * iterável *. Se * iterável * não for "
340
+ "especificado, o novo deque estará vazio."
338
341
339
342
#: ../../library/collections.rst:229
340
343
msgid ""
@@ -343,6 +346,11 @@ msgid ""
343
346
"safe, memory efficient appends and pops from either side of the deque with "
344
347
"approximately the same O(1) performance in either direction."
345
348
msgstr ""
349
+ "Deques são uma generalização de pilhas e filas (o nome é pronunciado "
350
+ "\" deck\" e é abreviação de\" fila dupla\" ). O Deques oferece suporte para "
351
+ "acréscimos e saliências com segurança de thread e com eficiência de memória "
352
+ "de ambos os lados do deque com aproximadamente o mesmo desempenho O (1) em "
353
+ "qualquer direção."
346
354
347
355
#: ../../library/collections.rst:234
348
356
msgid ""
@@ -351,6 +359,11 @@ msgid ""
351
359
"``pop(0)`` and ``insert(0, v)`` operations which change both the size and "
352
360
"position of the underlying data representation."
353
361
msgstr ""
362
+ "Embora os objetos: class: `list` suportem operações semelhantes, eles são "
363
+ "otimizados para operações rápidas de comprimento fixo e sujeitam em custos "
364
+ "de movimentação de memória O (n) para` `pop (0)` `e` `insert (0, v)` ` "
365
+ "operações que alteram o tamanho e a posição da representação de dados "
366
+ "subjacente."
354
367
355
368
#: ../../library/collections.rst:241
356
369
msgid ""
@@ -362,86 +375,110 @@ msgid ""
362
375
"They are also useful for tracking transactions and other pools of data where"
363
376
" only the most recent activity is of interest."
364
377
msgstr ""
378
+ "Se * maxlen * não for especificado ou for `` Nenhum``, deques podem crescer "
379
+ "para um comprimento arbitrário. Caso contrário, o deque é limitado ao "
380
+ "comprimento máximo especificado. Quando um deque de comprimento limitado "
381
+ "está cheio, quando novos itens são adicionados, um número correspondente de "
382
+ "itens é descartado da extremidade oposta. Deques de comprimento limitado "
383
+ "fornecem funcionalidade semelhante ao filtro `` tail`` no Unix. Eles também "
384
+ "são úteis para rastrear transações e outros pools de dados onde apenas a "
385
+ "atividade mais recente é de interesse."
365
386
366
387
#: ../../library/collections.rst:249
367
388
msgid "Added *maxlen* parameter."
368
389
msgstr ""
369
390
370
391
#: ../../library/collections.rst:252
371
392
msgid "Deque objects support the following methods:"
372
- msgstr ""
393
+ msgstr "Os objetos Deque suportam os seguintes métodos: "
373
394
374
395
#: ../../library/collections.rst:257
375
396
msgid "Add *x* to the right side of the deque."
376
- msgstr ""
397
+ msgstr "Adicione * x * ao lado direito do deque. "
377
398
378
399
#: ../../library/collections.rst:262
379
400
msgid "Add *x* to the left side of the deque."
380
- msgstr ""
401
+ msgstr "Adicione * x * ao lado esquerdo do deque "
381
402
382
403
#: ../../library/collections.rst:267
383
404
msgid "Remove all elements from the deque leaving it with length 0."
384
- msgstr ""
405
+ msgstr "Remova todos os elementos do deque deixando-o com comprimento 0. "
385
406
386
407
#: ../../library/collections.rst:272
387
408
msgid "Count the number of deque elements equal to *x*."
388
- msgstr ""
409
+ msgstr "Conta o número de elementos deque igual a * x *. "
389
410
390
411
#: ../../library/collections.rst:278
391
412
msgid ""
392
413
"Extend the right side of the deque by appending elements from the iterable "
393
414
"argument."
394
415
msgstr ""
416
+ "Estenda o lado direito do deque anexando elementos do argumento iterável."
395
417
396
418
#: ../../library/collections.rst:284
397
419
msgid ""
398
420
"Extend the left side of the deque by appending elements from *iterable*. "
399
421
"Note, the series of left appends results in reversing the order of elements "
400
422
"in the iterable argument."
401
423
msgstr ""
424
+ "Estenda o lado esquerdo do deque anexando elementos de *iterable*. Observe "
425
+ "que a série de acréscimos à esquerda resulta na reversão da ordem dos "
426
+ "elementos no argumento iterável."
402
427
403
428
#: ../../library/collections.rst:291
404
429
msgid ""
405
430
"Remove and return an element from the right side of the deque. If no "
406
431
"elements are present, raises an :exc:`IndexError`."
407
432
msgstr ""
433
+ "Remova e devolva um elemento do lado direito do deque. Se nenhum elemento "
434
+ "estiver presente, levanta um: exc: `IndexError`."
408
435
409
436
#: ../../library/collections.rst:297
410
437
msgid ""
411
438
"Remove and return an element from the left side of the deque. If no elements"
412
439
" are present, raises an :exc:`IndexError`."
413
440
msgstr ""
441
+ "Remova e devolva um elemento do lado esquerdo do deque. Se nenhum elemento "
442
+ "estiver presente, levanta um: exc: `IndexError`."
414
443
415
444
#: ../../library/collections.rst:303
416
445
msgid ""
417
446
"Remove the first occurrence of *value*. If not found, raises a "
418
447
":exc:`ValueError`."
419
448
msgstr ""
449
+ "Remova a primeira ocorrência de * valor *. Se não for encontrado, levanta "
450
+ "um: exc: `ValueError`."
420
451
421
452
#: ../../library/collections.rst:310
422
453
msgid "Reverse the elements of the deque in-place and then return ``None``."
423
454
msgstr ""
455
+ "Inverta os elementos do deque no local e, em seguida, retorne ``None``."
424
456
425
457
#: ../../library/collections.rst:316
426
458
msgid ""
427
459
"Rotate the deque *n* steps to the right. If *n* is negative, rotate to the "
428
460
"left."
429
461
msgstr ""
462
+ "Gire os passos deque * n * para a direita. Se * n * for negativo, gire para "
463
+ "a esquerda."
430
464
431
465
#: ../../library/collections.rst:319
432
466
msgid ""
433
467
"When the deque is not empty, rotating one step to the right is equivalent to"
434
468
" ``d.appendleft(d.pop())``, and rotating one step to the left is equivalent "
435
469
"to ``d.append(d.popleft())``."
436
470
msgstr ""
471
+ "Quando o deque não está vazio, girar um passo para a direita é equivalente a"
472
+ " ``d.appendleft(d.pop())``, e girar um passo para a esquerda é equivalente a"
473
+ " ``d.append(d.popleft())``."
437
474
438
475
#: ../../library/collections.rst:324
439
476
msgid "Deque objects also provide one read-only attribute:"
440
- msgstr ""
477
+ msgstr "Os objetos Deque também fornecem um atributo somente leitura: "
441
478
442
479
#: ../../library/collections.rst:328
443
480
msgid "Maximum size of a deque or ``None`` if unbounded."
444
- msgstr ""
481
+ msgstr "Tamanho máximo de um deque ou ``None`` se ilimitado. "
445
482
446
483
#: ../../library/collections.rst:333
447
484
msgid ""
@@ -462,19 +499,23 @@ msgstr "Receitas de :class:`deque`"
462
499
463
500
#: ../../library/collections.rst:398
464
501
msgid "This section shows various approaches to working with deques."
465
- msgstr ""
502
+ msgstr "Esta seção mostra várias abordagens para trabalhar com deques. "
466
503
467
504
#: ../../library/collections.rst:400
468
505
msgid ""
469
506
"Bounded length deques provide functionality similar to the ``tail`` filter "
470
507
"in Unix::"
471
508
msgstr ""
509
+ "Deques de comprimento limitado fornecem funcionalidade semelhante ao filtro "
510
+ "``tail`` em Unix ::"
472
511
473
512
#: ../../library/collections.rst:407
474
513
msgid ""
475
514
"Another approach to using deques is to maintain a sequence of recently added"
476
515
" elements by appending to the right and popping to the left::"
477
516
msgstr ""
517
+ "Outra abordagem para usar deques é manter uma sequência de elementos "
518
+ "adicionados recentemente, acrescentando à direita e clicando à esquerda::"
478
519
479
520
#: ../../library/collections.rst:422
480
521
msgid ""
@@ -512,38 +553,54 @@ msgid ""
512
553
"arguments are treated the same as if they were passed to the :class:`dict` "
513
554
"constructor, including keyword arguments."
514
555
msgstr ""
556
+ "O primeiro argumento fornece o valor inicial para o atributo: attr: "
557
+ "`default_factory`; o padrão é `` Nenhum``. Todos os argumentos restantes são"
558
+ " tratados da mesma forma como se fossem passados para o construtor: class:"
559
+ " `dict`, incluindo argumentos de palavra-chave."
515
560
516
561
#: ../../library/collections.rst:457
517
562
msgid ""
518
563
":class:`defaultdict` objects support the following method in addition to the"
519
564
" standard :class:`dict` operations:"
520
565
msgstr ""
566
+ "Os objetos: class: `defaultdict` suportam o seguinte método além das "
567
+ "operações padrão: class:` dict`:"
521
568
522
569
#: ../../library/collections.rst:462
523
570
msgid ""
524
571
"If the :attr:`default_factory` attribute is ``None``, this raises a "
525
572
":exc:`KeyError` exception with the *key* as argument."
526
573
msgstr ""
574
+ "Se o atributo: attr: `default_factory` é ``None``, isso levanta uma exceção:"
575
+ " exc:` KeyError` com a * chave * como argumento."
527
576
528
577
#: ../../library/collections.rst:465
529
578
msgid ""
530
579
"If :attr:`default_factory` is not ``None``, it is called without arguments "
531
580
"to provide a default value for the given *key*, this value is inserted in "
532
581
"the dictionary for the *key*, and returned."
533
582
msgstr ""
583
+ "Se: attr: `default_factory` não for ``None``, ele é chamado sem argumentos "
584
+ "para fornecer um valor padrão para a * chave * fornecida, este valor é "
585
+ "inserido no dicionário para a * chave * e retornado."
534
586
535
587
#: ../../library/collections.rst:469
536
588
msgid ""
537
589
"If calling :attr:`default_factory` raises an exception this exception is "
538
590
"propagated unchanged."
539
591
msgstr ""
592
+ "Se chamar: attr: `default_factory` levanta uma exceção, esta exceção é "
593
+ "propagada inalterada."
540
594
541
595
#: ../../library/collections.rst:472
542
596
msgid ""
543
597
"This method is called by the :meth:`__getitem__` method of the :class:`dict`"
544
598
" class when the requested key is not found; whatever it returns or raises is"
545
599
" then returned or raised by :meth:`__getitem__`."
546
600
msgstr ""
601
+ "Este método é chamado pelo método: meth: `__getitem__` da classe: class:` "
602
+ "dict` quando a chave solicitada não é encontrada; tudo o que ele retorna ou "
603
+ "aumenta é então retornado ou gerado por: meth: `__getitem__`."
547
604
548
605
#: ../../library/collections.rst:476
549
606
msgid ""