@@ -589,6 +589,9 @@ msgid ""
589
589
"with data from *iterable*. If *iterable* is not specified, the new deque is"
590
590
" empty."
591
591
msgstr ""
592
+ "Retorna um novo objeto deque inicializado da esquerda para a direita "
593
+ "(usando: meth: `append`) com dados de * iterável *. Se * iterável * não for "
594
+ "especificado, o novo deque estará vazio."
592
595
593
596
#: ../../library/collections.rst:405
594
597
msgid ""
@@ -597,6 +600,11 @@ msgid ""
597
600
"safe, memory efficient appends and pops from either side of the deque with "
598
601
"approximately the same O(1) performance in either direction."
599
602
msgstr ""
603
+ "Deques são uma generalização de pilhas e filas (o nome é pronunciado "
604
+ "\" deck\" e é abreviação de\" fila dupla\" ). O Deques oferece suporte para "
605
+ "acréscimos e saliências com segurança de thread e com eficiência de memória "
606
+ "de ambos os lados do deque com aproximadamente o mesmo desempenho O (1) em "
607
+ "qualquer direção."
600
608
601
609
#: ../../library/collections.rst:410
602
610
msgid ""
@@ -605,6 +613,11 @@ msgid ""
605
613
"``pop(0)`` and ``insert(0, v)`` operations which change both the size and "
606
614
"position of the underlying data representation."
607
615
msgstr ""
616
+ "Embora os objetos: class: `list` suportem operações semelhantes, eles são "
617
+ "otimizados para operações rápidas de comprimento fixo e sujeitam em custos "
618
+ "de movimentação de memória O (n) para` `pop (0)` `e` `insert (0, v)` ` "
619
+ "operações que alteram o tamanho e a posição da representação de dados "
620
+ "subjacente."
608
621
609
622
#: ../../library/collections.rst:416
610
623
msgid ""
@@ -616,103 +629,132 @@ msgid ""
616
629
"They are also useful for tracking transactions and other pools of data where"
617
630
" only the most recent activity is of interest."
618
631
msgstr ""
632
+ "Se * maxlen * não for especificado ou for `` Nenhum``, deques podem crescer "
633
+ "para um comprimento arbitrário. Caso contrário, o deque é limitado ao "
634
+ "comprimento máximo especificado. Quando um deque de comprimento limitado "
635
+ "está cheio, quando novos itens são adicionados, um número correspondente de "
636
+ "itens é descartado da extremidade oposta. Deques de comprimento limitado "
637
+ "fornecem funcionalidade semelhante ao filtro `` tail`` no Unix. Eles também "
638
+ "são úteis para rastrear transações e outros pools de dados onde apenas a "
639
+ "atividade mais recente é de interesse."
619
640
620
641
#: ../../library/collections.rst:425
621
642
msgid "Deque objects support the following methods:"
622
- msgstr ""
643
+ msgstr "Os objetos Deque suportam os seguintes métodos: "
623
644
624
645
#: ../../library/collections.rst:429
625
646
msgid "Add *x* to the right side of the deque."
626
- msgstr ""
647
+ msgstr "Adicione * x * ao lado direito do deque. "
627
648
628
649
#: ../../library/collections.rst:434
629
650
msgid "Add *x* to the left side of the deque."
630
- msgstr ""
651
+ msgstr "Adicione * x * ao lado esquerdo do deque "
631
652
632
653
#: ../../library/collections.rst:439
633
654
msgid "Remove all elements from the deque leaving it with length 0."
634
- msgstr ""
655
+ msgstr "Remova todos os elementos do deque deixando-o com comprimento 0. "
635
656
636
657
#: ../../library/collections.rst:444
637
658
msgid "Create a shallow copy of the deque."
638
- msgstr ""
659
+ msgstr "Cria uma cópia rasa do deque. "
639
660
640
661
#: ../../library/collections.rst:451
641
662
msgid "Count the number of deque elements equal to *x*."
642
- msgstr ""
663
+ msgstr "Conta o número de elementos deque igual a * x *. "
643
664
644
665
#: ../../library/collections.rst:458
645
666
msgid ""
646
667
"Extend the right side of the deque by appending elements from the iterable "
647
668
"argument."
648
669
msgstr ""
670
+ "Estenda o lado direito do deque anexando elementos do argumento iterável."
649
671
650
672
#: ../../library/collections.rst:464
651
673
msgid ""
652
674
"Extend the left side of the deque by appending elements from *iterable*. "
653
675
"Note, the series of left appends results in reversing the order of elements "
654
676
"in the iterable argument."
655
677
msgstr ""
678
+ "Estenda o lado esquerdo do deque anexando elementos de *iterable*. Observe "
679
+ "que a série de acréscimos à esquerda resulta na reversão da ordem dos "
680
+ "elementos no argumento iterável."
656
681
657
682
#: ../../library/collections.rst:471
658
683
msgid ""
659
684
"Return the position of *x* in the deque (at or after index *start* and "
660
685
"before index *stop*). Returns the first match or raises :exc:`ValueError` "
661
686
"if not found."
662
687
msgstr ""
688
+ "Retorne a posição de * x * no deque (no ou após o índice * início * e antes "
689
+ "do índice * parada *). Retorna a primeira correspondência ou aumenta: exc: "
690
+ "`ValueError` se não for encontrado."
663
691
664
692
#: ../../library/collections.rst:480
665
693
msgid "Insert *x* into the deque at position *i*."
666
- msgstr ""
694
+ msgstr "Insira * x * no deque na posição * i *. "
667
695
668
696
#: ../../library/collections.rst:482
669
697
msgid ""
670
698
"If the insertion would cause a bounded deque to grow beyond *maxlen*, an "
671
699
":exc:`IndexError` is raised."
672
700
msgstr ""
701
+ "Se a inserção fizer com que um deque limitado cresça além de * maxlen *, um:"
702
+ " exc: `IndexError` é gerado."
673
703
674
704
#: ../../library/collections.rst:490
675
705
msgid ""
676
706
"Remove and return an element from the right side of the deque. If no "
677
707
"elements are present, raises an :exc:`IndexError`."
678
708
msgstr ""
709
+ "Remova e devolva um elemento do lado direito do deque. Se nenhum elemento "
710
+ "estiver presente, levanta um: exc: `IndexError`."
679
711
680
712
#: ../../library/collections.rst:496
681
713
msgid ""
682
714
"Remove and return an element from the left side of the deque. If no elements"
683
715
" are present, raises an :exc:`IndexError`."
684
716
msgstr ""
717
+ "Remova e devolva um elemento do lado esquerdo do deque. Se nenhum elemento "
718
+ "estiver presente, levanta um: exc: `IndexError`."
685
719
686
720
#: ../../library/collections.rst:502
687
721
msgid ""
688
722
"Remove the first occurrence of *value*. If not found, raises a "
689
723
":exc:`ValueError`."
690
724
msgstr ""
725
+ "Remova a primeira ocorrência de * valor *. Se não for encontrado, levanta "
726
+ "um: exc: `ValueError`."
691
727
692
728
#: ../../library/collections.rst:508
693
729
msgid "Reverse the elements of the deque in-place and then return ``None``."
694
730
msgstr ""
731
+ "Inverta os elementos do deque no local e, em seguida, retorne ``None``."
695
732
696
733
#: ../../library/collections.rst:515
697
734
msgid ""
698
735
"Rotate the deque *n* steps to the right. If *n* is negative, rotate to the "
699
736
"left."
700
737
msgstr ""
738
+ "Gire os passos deque * n * para a direita. Se * n * for negativo, gire para "
739
+ "a esquerda."
701
740
702
741
#: ../../library/collections.rst:518
703
742
msgid ""
704
743
"When the deque is not empty, rotating one step to the right is equivalent to"
705
744
" ``d.appendleft(d.pop())``, and rotating one step to the left is equivalent "
706
745
"to ``d.append(d.popleft())``."
707
746
msgstr ""
747
+ "Quando o deque não está vazio, girar um passo para a direita é equivalente a"
748
+ " ``d.appendleft(d.pop())``, e girar um passo para a esquerda é equivalente a"
749
+ " ``d.append(d.popleft())``."
708
750
709
751
#: ../../library/collections.rst:523
710
752
msgid "Deque objects also provide one read-only attribute:"
711
- msgstr ""
753
+ msgstr "Os objetos Deque também fornecem um atributo somente leitura: "
712
754
713
755
#: ../../library/collections.rst:527
714
756
msgid "Maximum size of a deque or ``None`` if unbounded."
715
- msgstr ""
757
+ msgstr "Tamanho máximo de um deque ou ``None`` se ilimitado. "
716
758
717
759
#: ../../library/collections.rst:532
718
760
msgid ""
@@ -728,6 +770,8 @@ msgid ""
728
770
"Starting in version 3.5, deques support ``__add__()``, ``__mul__()``, and "
729
771
"``__imul__()``."
730
772
msgstr ""
773
+ "A partir da versão 3.5, deques suporta `` __add __ () ``, `` __mul __ () `` "
774
+ "e `` __imul __ () ``."
731
775
732
776
#: ../../library/collections.rst:541
733
777
msgid "Example:"
@@ -739,19 +783,23 @@ msgstr "Receitas de :class:`deque`"
739
783
740
784
#: ../../library/collections.rst:600
741
785
msgid "This section shows various approaches to working with deques."
742
- msgstr ""
786
+ msgstr "Esta seção mostra várias abordagens para trabalhar com deques. "
743
787
744
788
#: ../../library/collections.rst:602
745
789
msgid ""
746
790
"Bounded length deques provide functionality similar to the ``tail`` filter "
747
791
"in Unix::"
748
792
msgstr ""
793
+ "Deques de comprimento limitado fornecem funcionalidade semelhante ao filtro "
794
+ "``tail`` em Unix ::"
749
795
750
796
#: ../../library/collections.rst:610
751
797
msgid ""
752
798
"Another approach to using deques is to maintain a sequence of recently added"
753
799
" elements by appending to the right and popping to the left::"
754
800
msgstr ""
801
+ "Outra abordagem para usar deques é manter uma sequência de elementos "
802
+ "adicionados recentemente, acrescentando à direita e clicando à esquerda::"
755
803
756
804
#: ../../library/collections.rst:625
757
805
msgid ""
@@ -789,38 +837,54 @@ msgid ""
789
837
"arguments are treated the same as if they were passed to the :class:`dict` "
790
838
"constructor, including keyword arguments."
791
839
msgstr ""
840
+ "O primeiro argumento fornece o valor inicial para o atributo: attr: "
841
+ "`default_factory`; o padrão é `` Nenhum``. Todos os argumentos restantes são"
842
+ " tratados da mesma forma como se fossem passados para o construtor: class:"
843
+ " `dict`, incluindo argumentos de palavra-chave."
792
844
793
845
#: ../../library/collections.rst:659
794
846
msgid ""
795
847
":class:`defaultdict` objects support the following method in addition to the"
796
848
" standard :class:`dict` operations:"
797
849
msgstr ""
850
+ "Os objetos: class: `defaultdict` suportam o seguinte método além das "
851
+ "operações padrão: class:` dict`:"
798
852
799
853
#: ../../library/collections.rst:664
800
854
msgid ""
801
855
"If the :attr:`default_factory` attribute is ``None``, this raises a "
802
856
":exc:`KeyError` exception with the *key* as argument."
803
857
msgstr ""
858
+ "Se o atributo: attr: `default_factory` é ``None``, isso levanta uma exceção:"
859
+ " exc:` KeyError` com a * chave * como argumento."
804
860
805
861
#: ../../library/collections.rst:667
806
862
msgid ""
807
863
"If :attr:`default_factory` is not ``None``, it is called without arguments "
808
864
"to provide a default value for the given *key*, this value is inserted in "
809
865
"the dictionary for the *key*, and returned."
810
866
msgstr ""
867
+ "Se: attr: `default_factory` não for ``None``, ele é chamado sem argumentos "
868
+ "para fornecer um valor padrão para a * chave * fornecida, este valor é "
869
+ "inserido no dicionário para a * chave * e retornado."
811
870
812
871
#: ../../library/collections.rst:671
813
872
msgid ""
814
873
"If calling :attr:`default_factory` raises an exception this exception is "
815
874
"propagated unchanged."
816
875
msgstr ""
876
+ "Se chamar: attr: `default_factory` levanta uma exceção, esta exceção é "
877
+ "propagada inalterada."
817
878
818
879
#: ../../library/collections.rst:674
819
880
msgid ""
820
881
"This method is called by the :meth:`__getitem__` method of the :class:`dict`"
821
882
" class when the requested key is not found; whatever it returns or raises is"
822
883
" then returned or raised by :meth:`__getitem__`."
823
884
msgstr ""
885
+ "Este método é chamado pelo método: meth: `__getitem__` da classe: class:` "
886
+ "dict` quando a chave solicitada não é encontrada; tudo o que ele retorna ou "
887
+ "aumenta é então retornado ou gerado por: meth: `__getitem__`."
824
888
825
889
#: ../../library/collections.rst:678
826
890
msgid ""