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