@@ -596,6 +596,9 @@ msgid ""
596
596
"To enumerate all distinct multisets of a given size over a given set of "
597
597
"elements, see :func:`itertools.combinations_with_replacement`::"
598
598
msgstr ""
599
+ "Para enumerar todos os multisets distintos de um determinado tamanho em um "
600
+ "determinado conjunto de elementos, consulte: func:` itertools."
601
+ "combinations_with_replacement` ::"
599
602
600
603
#: ../../library/collections.rst:413
601
604
msgid ":class:`deque` objects"
@@ -607,6 +610,9 @@ msgid ""
607
610
"with data from *iterable*. If *iterable* is not specified, the new deque is "
608
611
"empty."
609
612
msgstr ""
613
+ "Retorna um novo objeto deque inicializado da esquerda para a direita "
614
+ "(usando: meth: `append`) com dados de * iterável *. Se * iterável * não for "
615
+ "especificado, o novo deque estará vazio."
610
616
611
617
#: ../../library/collections.rst:420
612
618
msgid ""
@@ -615,6 +621,11 @@ msgid ""
615
621
"safe, memory efficient appends and pops from either side of the deque with "
616
622
"approximately the same O(1) performance in either direction."
617
623
msgstr ""
624
+ "Deques são uma generalização de pilhas e filas (o nome é pronunciado\" deck"
625
+ "\" e é abreviação de\" fila dupla\" ). O Deques oferece suporte para "
626
+ "acréscimos e saliências com segurança de thread e com eficiência de memória "
627
+ "de ambos os lados do deque com aproximadamente o mesmo desempenho O (1) em "
628
+ "qualquer direção."
618
629
619
630
#: ../../library/collections.rst:425
620
631
msgid ""
@@ -623,6 +634,11 @@ msgid ""
623
634
"``pop(0)`` and ``insert(0, v)`` operations which change both the size and "
624
635
"position of the underlying data representation."
625
636
msgstr ""
637
+ "Embora os objetos: class: `list` suportem operações semelhantes, eles são "
638
+ "otimizados para operações rápidas de comprimento fixo e sujeitam em custos "
639
+ "de movimentação de memória O (n) para` `pop (0)` `e` `insert (0, v)` ` "
640
+ "operações que alteram o tamanho e a posição da representação de dados "
641
+ "subjacente."
626
642
627
643
#: ../../library/collections.rst:431
628
644
msgid ""
@@ -634,103 +650,132 @@ msgid ""
634
650
"They are also useful for tracking transactions and other pools of data where "
635
651
"only the most recent activity is of interest."
636
652
msgstr ""
653
+ "Se * maxlen * não for especificado ou for `` Nenhum``, deques podem crescer "
654
+ "para um comprimento arbitrário. Caso contrário, o deque é limitado ao "
655
+ "comprimento máximo especificado. Quando um deque de comprimento limitado "
656
+ "está cheio, quando novos itens são adicionados, um número correspondente de "
657
+ "itens é descartado da extremidade oposta. Deques de comprimento limitado "
658
+ "fornecem funcionalidade semelhante ao filtro `` tail`` no Unix. Eles também "
659
+ "são úteis para rastrear transações e outros pools de dados onde apenas a "
660
+ "atividade mais recente é de interesse."
637
661
638
662
#: ../../library/collections.rst:440
639
663
msgid "Deque objects support the following methods:"
640
- msgstr ""
664
+ msgstr "Os objetos Deque suportam os seguintes métodos: "
641
665
642
666
#: ../../library/collections.rst:444
643
667
msgid "Add *x* to the right side of the deque."
644
- msgstr ""
668
+ msgstr "Adicione * x * ao lado direito do deque. "
645
669
646
670
#: ../../library/collections.rst:449
647
671
msgid "Add *x* to the left side of the deque."
648
- msgstr ""
672
+ msgstr "Adicione * x * ao lado esquerdo do deque "
649
673
650
674
#: ../../library/collections.rst:454
651
675
msgid "Remove all elements from the deque leaving it with length 0."
652
- msgstr ""
676
+ msgstr "Remova todos os elementos do deque deixando-o com comprimento 0. "
653
677
654
678
#: ../../library/collections.rst:459
655
679
msgid "Create a shallow copy of the deque."
656
- msgstr ""
680
+ msgstr "Cria uma cópia rasa do deque. "
657
681
658
682
#: ../../library/collections.rst:466
659
683
msgid "Count the number of deque elements equal to *x*."
660
- msgstr ""
684
+ msgstr "Conta o número de elementos deque igual a * x *. "
661
685
662
686
#: ../../library/collections.rst:473
663
687
msgid ""
664
688
"Extend the right side of the deque by appending elements from the iterable "
665
689
"argument."
666
690
msgstr ""
691
+ "Estenda o lado direito do deque anexando elementos do argumento iterável."
667
692
668
693
#: ../../library/collections.rst:479
669
694
msgid ""
670
695
"Extend the left side of the deque by appending elements from *iterable*. "
671
696
"Note, the series of left appends results in reversing the order of elements "
672
697
"in the iterable argument."
673
698
msgstr ""
699
+ "Estenda o lado esquerdo do deque anexando elementos de *iterable*. Observe "
700
+ "que a série de acréscimos à esquerda resulta na reversão da ordem dos "
701
+ "elementos no argumento iterável."
674
702
675
703
#: ../../library/collections.rst:486
676
704
msgid ""
677
705
"Return the position of *x* in the deque (at or after index *start* and "
678
706
"before index *stop*). Returns the first match or raises :exc:`ValueError` "
679
707
"if not found."
680
708
msgstr ""
709
+ "Retorne a posição de * x * no deque (no ou após o índice * início * e antes "
710
+ "do índice * parada *). Retorna a primeira correspondência ou aumenta: exc: "
711
+ "`ValueError` se não for encontrado."
681
712
682
713
#: ../../library/collections.rst:495
683
714
msgid "Insert *x* into the deque at position *i*."
684
- msgstr ""
715
+ msgstr "Insira * x * no deque na posição * i *. "
685
716
686
717
#: ../../library/collections.rst:497
687
718
msgid ""
688
719
"If the insertion would cause a bounded deque to grow beyond *maxlen*, an :"
689
720
"exc:`IndexError` is raised."
690
721
msgstr ""
722
+ "Se a inserção fizer com que um deque limitado cresça além de * maxlen *, um: "
723
+ "exc: `IndexError` é gerado."
691
724
692
725
#: ../../library/collections.rst:505
693
726
msgid ""
694
727
"Remove and return an element from the right side of the deque. If no "
695
728
"elements are present, raises an :exc:`IndexError`."
696
729
msgstr ""
730
+ "Remova e devolva um elemento do lado direito do deque. Se nenhum elemento "
731
+ "estiver presente, levanta um: exc: `IndexError`."
697
732
698
733
#: ../../library/collections.rst:511
699
734
msgid ""
700
735
"Remove and return an element from the left side of the deque. If no elements "
701
736
"are present, raises an :exc:`IndexError`."
702
737
msgstr ""
738
+ "Remova e devolva um elemento do lado esquerdo do deque. Se nenhum elemento "
739
+ "estiver presente, levanta um: exc: `IndexError`."
703
740
704
741
#: ../../library/collections.rst:517
705
742
msgid ""
706
743
"Remove the first occurrence of *value*. If not found, raises a :exc:"
707
744
"`ValueError`."
708
745
msgstr ""
746
+ "Remova a primeira ocorrência de * valor *. Se não for encontrado, levanta "
747
+ "um: exc: `ValueError`."
709
748
710
749
#: ../../library/collections.rst:523
711
750
msgid "Reverse the elements of the deque in-place and then return ``None``."
712
751
msgstr ""
752
+ "Inverta os elementos do deque no local e, em seguida, retorne ``None``."
713
753
714
754
#: ../../library/collections.rst:530
715
755
msgid ""
716
756
"Rotate the deque *n* steps to the right. If *n* is negative, rotate to the "
717
757
"left."
718
758
msgstr ""
759
+ "Gire os passos deque * n * para a direita. Se * n * for negativo, gire para "
760
+ "a esquerda."
719
761
720
762
#: ../../library/collections.rst:533
721
763
msgid ""
722
764
"When the deque is not empty, rotating one step to the right is equivalent to "
723
765
"``d.appendleft(d.pop())``, and rotating one step to the left is equivalent "
724
766
"to ``d.append(d.popleft())``."
725
767
msgstr ""
768
+ "Quando o deque não está vazio, girar um passo para a direita é equivalente a "
769
+ "``d.appendleft(d.pop())``, e girar um passo para a esquerda é equivalente a "
770
+ "``d.append(d.popleft())``."
726
771
727
772
#: ../../library/collections.rst:538
728
773
msgid "Deque objects also provide one read-only attribute:"
729
- msgstr ""
774
+ msgstr "Os objetos Deque também fornecem um atributo somente leitura: "
730
775
731
776
#: ../../library/collections.rst:542
732
777
msgid "Maximum size of a deque or ``None`` if unbounded."
733
- msgstr ""
778
+ msgstr "Tamanho máximo de um deque ou ``None`` se ilimitado. "
734
779
735
780
#: ../../library/collections.rst:547
736
781
msgid ""
@@ -746,6 +791,8 @@ msgid ""
746
791
"Starting in version 3.5, deques support ``__add__()``, ``__mul__()``, and "
747
792
"``__imul__()``."
748
793
msgstr ""
794
+ "A partir da versão 3.5, deques suporta `` __add __ () ``, `` __mul __ () `` "
795
+ "e `` __imul __ () ``."
749
796
750
797
#: ../../library/collections.rst:556
751
798
msgid "Example:"
@@ -757,19 +804,23 @@ msgstr "Receitas de :class:`deque`"
757
804
758
805
#: ../../library/collections.rst:615
759
806
msgid "This section shows various approaches to working with deques."
760
- msgstr ""
807
+ msgstr "Esta seção mostra várias abordagens para trabalhar com deques. "
761
808
762
809
#: ../../library/collections.rst:617
763
810
msgid ""
764
811
"Bounded length deques provide functionality similar to the ``tail`` filter "
765
812
"in Unix::"
766
813
msgstr ""
814
+ "Deques de comprimento limitado fornecem funcionalidade semelhante ao filtro "
815
+ "``tail`` em Unix ::"
767
816
768
817
#: ../../library/collections.rst:625
769
818
msgid ""
770
819
"Another approach to using deques is to maintain a sequence of recently added "
771
820
"elements by appending to the right and popping to the left::"
772
821
msgstr ""
822
+ "Outra abordagem para usar deques é manter uma sequência de elementos "
823
+ "adicionados recentemente, acrescentando à direita e clicando à esquerda::"
773
824
774
825
#: ../../library/collections.rst:640
775
826
msgid ""
@@ -780,13 +831,23 @@ msgid ""
780
831
"popleft`; otherwise, it can be cycled back to the end with the :meth:`~deque."
781
832
"rotate` method::"
782
833
msgstr ""
834
+ "Um `escalonador round-robin <https://en.wikipedia.org/wiki/Round-"
835
+ "robin_scheduling>` _ pode ser implementado com iteradores de entrada "
836
+ "armazenados em um: class: `deque`. Os valores são gerados a partir do "
837
+ "iterador ativo na posição zero. Se esse iterador estiver esgotado, ele pode "
838
+ "ser removido com: meth: `~ deque.popleft`; caso contrário, ele pode voltar "
839
+ "ao fim com o método: meth: `~ deque.rotate` ::"
783
840
784
841
#: ../../library/collections.rst:659
785
842
msgid ""
786
843
"The :meth:`~deque.rotate` method provides a way to implement :class:`deque` "
787
844
"slicing and deletion. For example, a pure Python implementation of ``del "
788
845
"d[n]`` relies on the ``rotate()`` method to position elements to be popped::"
789
846
msgstr ""
847
+ "O método: meth: `~ deque.rotate` fornece uma maneira de implementar o corte "
848
+ "e exclusão: class:` deque`. Por exemplo, uma implementação Python pura de "
849
+ "``del d[n]`` depende do método ``rotate()`` para posicionar os elementos a "
850
+ "serem popped ::"
790
851
791
852
#: ../../library/collections.rst:668
792
853
msgid ""
@@ -797,6 +858,13 @@ msgid ""
797
858
"that approach, it is easy to implement Forth style stack manipulations such "
798
859
"as ``dup``, ``drop``, ``swap``, ``over``, ``pick``, ``rot``, and ``roll``."
799
860
msgstr ""
861
+ "Para implementar o corte: class: `deque`, use uma abordagem semelhante "
862
+ "aplicando: meth:` ~ deque.rotate` para trazer um elemento alvo para o lado "
863
+ "esquerdo do deque. Remova as entradas antigas com: meth: `~ deque.popleft`, "
864
+ "adicione novas entradas com: meth:` ~ deque.extend`, e então inverta a "
865
+ "rotação. Com pequenas variações dessa abordagem, é fácil implementar "
866
+ "manipulações de pilha de estilo Forth, como ``dup``,``drop``,``swap``,"
867
+ "``over``,``pick``,``rot``, and ``roll``."
800
868
801
869
#: ../../library/collections.rst:678
802
870
msgid ":class:`defaultdict` objects"
@@ -817,38 +885,54 @@ msgid ""
817
885
"arguments are treated the same as if they were passed to the :class:`dict` "
818
886
"constructor, including keyword arguments."
819
887
msgstr ""
888
+ "O primeiro argumento fornece o valor inicial para o atributo: attr: "
889
+ "`default_factory`; o padrão é `` Nenhum``. Todos os argumentos restantes são "
890
+ "tratados da mesma forma como se fossem passados para o construtor: class: "
891
+ "`dict`, incluindo argumentos de palavra-chave."
820
892
821
893
#: ../../library/collections.rst:693
822
894
msgid ""
823
895
":class:`defaultdict` objects support the following method in addition to the "
824
896
"standard :class:`dict` operations:"
825
897
msgstr ""
898
+ "Os objetos: class: `defaultdict` suportam o seguinte método além das "
899
+ "operações padrão: class:` dict`:"
826
900
827
901
#: ../../library/collections.rst:698
828
902
msgid ""
829
903
"If the :attr:`default_factory` attribute is ``None``, this raises a :exc:"
830
904
"`KeyError` exception with the *key* as argument."
831
905
msgstr ""
906
+ "Se o atributo: attr: `default_factory` é ``None``, isso levanta uma exceção: "
907
+ "exc:` KeyError` com a * chave * como argumento."
832
908
833
909
#: ../../library/collections.rst:701
834
910
msgid ""
835
911
"If :attr:`default_factory` is not ``None``, it is called without arguments "
836
912
"to provide a default value for the given *key*, this value is inserted in "
837
913
"the dictionary for the *key*, and returned."
838
914
msgstr ""
915
+ "Se: attr: `default_factory` não for ``None``, ele é chamado sem argumentos "
916
+ "para fornecer um valor padrão para a * chave * fornecida, este valor é "
917
+ "inserido no dicionário para a * chave * e retornado."
839
918
840
919
#: ../../library/collections.rst:705
841
920
msgid ""
842
921
"If calling :attr:`default_factory` raises an exception this exception is "
843
922
"propagated unchanged."
844
923
msgstr ""
924
+ "Se chamar: attr: `default_factory` levanta uma exceção, esta exceção é "
925
+ "propagada inalterada."
845
926
846
927
#: ../../library/collections.rst:708
847
928
msgid ""
848
929
"This method is called by the :meth:`__getitem__` method of the :class:`dict` "
849
930
"class when the requested key is not found; whatever it returns or raises is "
850
931
"then returned or raised by :meth:`__getitem__`."
851
932
msgstr ""
933
+ "Este método é chamado pelo método: meth: `__getitem__` da classe: class:` "
934
+ "dict` quando a chave solicitada não é encontrada; tudo o que ele retorna ou "
935
+ "aumenta é então retornado ou gerado por: meth: `__getitem__`."
852
936
853
937
#: ../../library/collections.rst:712
854
938
msgid ""