GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — python-docs-pt-br/reference/datamodel.po at 3.9 · python/python-docs-pt-br Expand file tree/ Copy pathdatamodel.poMore file actions 4808 lines (4324 loc) · 232 KB / Copy pathdatamodel.poFile metadata and controls4808 lines (4324 loc) · 232 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 # SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2025, Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # # Translators: # python-doc bot, 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.9\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2025-09-22 21:56+0000\n" "PO-Revision-Date: 2025-09-22 17:56+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Portuguese (Brazil) (https://app.transifex.com/python-doc/" "teams/5390/pt_BR/)\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % " "1000000 == 0 ? 1 : 2;\n" #: ../../reference/datamodel.rst:6 msgid "Data model" msgstr "Modelo de dados" #: ../../reference/datamodel.rst:12 msgid "Objects, values and types" msgstr "Objetos, valores e tipos" #: ../../reference/datamodel.rst:18 msgid "" ":dfn:`Objects` are Python's abstraction for data. All data in a Python " "program is represented by objects or by relations between objects. (In a " "sense, and in conformance to Von Neumann's model of a \"stored program " "computer\", code is also represented by objects.)" msgstr "" ":dfn:`Objetos` são abstrações do Python para dados. Todos os dados em um " "programa Python são representados por objetos ou por relações entre objetos. " "(De certo modo, e em conformidade com o modelo de Von Neumann de um " "\"computador com programa armazenado\", código também é representado por " "objetos.)" #: ../../reference/datamodel.rst:35 msgid "" "Every object has an identity, a type and a value. An object's *identity* " "never changes once it has been created; you may think of it as the object's " "address in memory. The ':keyword:`is`' operator compares the identity of " "two objects; the :func:`id` function returns an integer representing its " "identity." msgstr "" "Todo objeto tem uma identidade, um tipo e um valor. A *identidade* de um " "objeto nunca muda depois de criado; você pode pensar nisso como endereço de " "objetos em memória. O operador :keyword:`is` compara as identidades de dois " "objetos; a função :func:`id` retorna um inteiro representando sua identidade." #: ../../reference/datamodel.rst:42 msgid "For CPython, ``id(x)`` is the memory address where ``x`` is stored." msgstr "" "Para CPython, ``id(x)`` é o endereço de memória em que ``x`` está armazenado." #: ../../reference/datamodel.rst:44 msgid "" "An object's type determines the operations that the object supports (e.g., " "\"does it have a length?\") and also defines the possible values for objects " "of that type. The :func:`type` function returns an object's type (which is " "an object itself). Like its identity, an object's :dfn:`type` is also " "unchangeable. [#]_" msgstr "" "O tipo de um objeto determina as operações que o objeto implementa (por " "exemplo, \"ele tem um comprimento?\") e também define os valores possíveis " "para objetos desse tipo. A função :func:`type` retorna o tipo de um objeto " "(que é também um objeto). Como sua identidade, o :dfn:`tipo` do objeto " "também é imutável. [#]_" #: ../../reference/datamodel.rst:50 msgid "" "The *value* of some objects can change. Objects whose value can change are " "said to be *mutable*; objects whose value is unchangeable once they are " "created are called *immutable*. (The value of an immutable container object " "that contains a reference to a mutable object can change when the latter's " "value is changed; however the container is still considered immutable, " "because the collection of objects it contains cannot be changed. So, " "immutability is not strictly the same as having an unchangeable value, it is " "more subtle.) An object's mutability is determined by its type; for " "instance, numbers, strings and tuples are immutable, while dictionaries and " "lists are mutable." msgstr "" "O *valor* de alguns objetos pode mudar. Objetos cujos valores podem mudar " "são descritos como *mutáveis*, objetos cujo valor não pode ser mudado uma " "vez que foram criados são chamados *imutáveis*. (O valor de um objeto " "contêiner imutável que contém uma referência a um objeto mutável pode mudar " "quando o valor deste último for mudado; no entanto o contêiner é ainda assim " "considerada imutável, pois a coleção de objetos que contém não pode ser " "mudada. Então a imutabilidade não é estritamente o mesmo do que não haver " "mudanças de valor, é mais sutil.) A mutabilidade de um objeto é determinada " "pelo seu tipo; por exemplo, números, strings e tuplas são imutáveis, " "enquanto dicionários e listas são mutáveis." #: ../../reference/datamodel.rst:65 msgid "" "Objects are never explicitly destroyed; however, when they become " "unreachable they may be garbage-collected. An implementation is allowed to " "postpone garbage collection or omit it altogether --- it is a matter of " "implementation quality how garbage collection is implemented, as long as no " "objects are collected that are still reachable." msgstr "" "Os objetos nunca são destruídos explicitamente; no entanto, quando eles se " "tornam inacessíveis, eles podem ser coletados como lixo. Uma implementação " "tem permissão para adiar a coleta de lixo ou omiti-la completamente -- é uma " "questão de detalhe de implementação como a coleta de lixo é implementada, " "desde que nenhum objeto que ainda esteja acessível seja coletado." #: ../../reference/datamodel.rst:73 msgid "" "CPython currently uses a reference-counting scheme with (optional) delayed " "detection of cyclically linked garbage, which collects most objects as soon " "as they become unreachable, but is not guaranteed to collect garbage " "containing circular references. See the documentation of the :mod:`gc` " "module for information on controlling the collection of cyclic garbage. " "Other implementations act differently and CPython may change. Do not depend " "on immediate finalization of objects when they become unreachable (so you " "should always close files explicitly)." msgstr "" "CPython atualmente usa um esquema de contagem de referências com detecção " "atrasada (opcional) de lixo ligado ciclicamente, que coleta a maioria dos " "objetos assim que eles se tornam inacessíveis, mas não é garantido que " "coletará lixo contendo referências circulares. Veja a documentação do " "módulo :mod:`gc` para informações sobre como controlar a coleta de lixo " "cíclico. Outras implementações agem de forma diferente e o CPython pode " "mudar. Não dependa da finalização imediata dos objetos quando eles se " "tornarem inacessíveis (isto é, você deve sempre fechar os arquivos " "explicitamente)." #: ../../reference/datamodel.rst:82 msgid "" "Note that the use of the implementation's tracing or debugging facilities " "may keep objects alive that would normally be collectable. Also note that " "catching an exception with a ':keyword:`try`...\\ :keyword:`except`' " "statement may keep objects alive." msgstr "" "Observe que o uso dos recursos de rastreamento ou depuração da implementação " "pode manter os objetos ativos que normalmente seriam coletáveis. Observe " "também que capturar uma exceção com uma instrução \":keyword:`try`...\\ :" "keyword:`except`\" pode manter os objetos vivos." #: ../../reference/datamodel.rst:87 msgid "" "Some objects contain references to \"external\" resources such as open files " "or windows. It is understood that these resources are freed when the object " "is garbage-collected, but since garbage collection is not guaranteed to " "happen, such objects also provide an explicit way to release the external " "resource, usually a :meth:`close` method. Programs are strongly recommended " "to explicitly close such objects. The ':keyword:`try`...\\ :keyword:" "`finally`' statement and the ':keyword:`with`' statement provide convenient " "ways to do this." msgstr "" "Alguns objetos contêm referências a recursos \"externos\", como arquivos " "abertos ou janelas. Entende-se que esses recursos são liberados quando o " "objeto é coletado como lixo, mas como a coleta de lixo não é garantida, tais " "objetos também fornecem uma maneira explícita de liberar o recurso externo, " "geralmente um método :meth:`close`. Os programas são fortemente recomendados " "para fechar explicitamente esses objetos. A instrução \":keyword:`try`...\\ :" "keyword:`finally`\" e a instrução \":keyword:`with`\" fornecem maneiras " "convenientes de fazer isso." #: ../../reference/datamodel.rst:97 msgid "" "Some objects contain references to other objects; these are called " "*containers*. Examples of containers are tuples, lists and dictionaries. " "The references are part of a container's value. In most cases, when we talk " "about the value of a container, we imply the values, not the identities of " "the contained objects; however, when we talk about the mutability of a " "container, only the identities of the immediately contained objects are " "implied. So, if an immutable container (like a tuple) contains a reference " "to a mutable object, its value changes if that mutable object is changed." msgstr "" "Alguns objetos contêm referências a outros objetos; eles são chamados de " "*contêineres*. Exemplos de contêineres são tuplas, listas e dicionários. As " "referências fazem parte do valor de um contêiner. Na maioria dos casos, " "quando falamos sobre o valor de um contêiner, nos referimos aos valores, não " "às identidades dos objetos contidos; entretanto, quando falamos sobre a " "mutabilidade de um contêiner, apenas as identidades dos objetos contidos " "imediatamente estão implícitas. Portanto, se um contêiner imutável (como uma " "tupla) contém uma referência a um objeto mutável, seu valor muda se esse " "objeto mutável for alterado." #: ../../reference/datamodel.rst:106 msgid "" "Types affect almost all aspects of object behavior. Even the importance of " "object identity is affected in some sense: for immutable types, operations " "that compute new values may actually return a reference to any existing " "object with the same type and value, while for mutable objects this is not " "allowed. E.g., after ``a = 1; b = 1``, ``a`` and ``b`` may or may not refer " "to the same object with the value one, depending on the implementation, but " "after ``c = []; d = []``, ``c`` and ``d`` are guaranteed to refer to two " "different, unique, newly created empty lists. (Note that ``c = d = []`` " "assigns the same object to both ``c`` and ``d``.)" msgstr "" "Os tipos afetam quase todos os aspectos do comportamento do objeto. Até " "mesmo a importância da identidade do objeto é afetada em algum sentido: para " "tipos imutáveis, as operações que calculam novos valores podem realmente " "retornar uma referência a qualquer objeto existente com o mesmo tipo e " "valor, enquanto para objetos mutáveis isso não é permitido. Por exemplo, " "após ``a = 1; b = 1``, ``a`` e ``b`` podem ou não se referir ao mesmo objeto " "com o valor um, dependendo da implementação, mas após ``c = []; d = []``, " "``c`` e ``d`` têm a garantia de referir-se a duas listas vazias diferentes e " "únicas. (Observe que ``c = d = []`` atribui o mesmo objeto para ``c`` e " "``d``.)" #: ../../reference/datamodel.rst:120 msgid "The standard type hierarchy" msgstr "A hierarquia de tipos padrão" #: ../../reference/datamodel.rst:129 msgid "" "Below is a list of the types that are built into Python. Extension modules " "(written in C, Java, or other languages, depending on the implementation) " "can define additional types. Future versions of Python may add types to the " "type hierarchy (e.g., rational numbers, efficiently stored arrays of " "integers, etc.), although such additions will often be provided via the " "standard library instead." msgstr "" "Abaixo está uma lista dos tipos que são embutidos no Python. Módulos de " "extensão (escritos em C, Java ou outras linguagens, dependendo da " "implementação) podem definir tipos adicionais. Versões futuras do Python " "podem adicionar tipos à hierarquia de tipo (por exemplo, números racionais, " "matrizes de inteiros armazenadas de forma eficiente, etc.), embora tais " "adições sejam frequentemente fornecidas por meio da biblioteca padrão." #: ../../reference/datamodel.rst:140 msgid "" "Some of the type descriptions below contain a paragraph listing 'special " "attributes.' These are attributes that provide access to the implementation " "and are not intended for general use. Their definition may change in the " "future." msgstr "" "Algumas das descrições de tipo abaixo contêm um parágrafo listando " "\"atributos especiais\". Esses são atributos que fornecem acesso à " "implementação e não se destinam ao uso geral. Sua definição pode mudar no " "futuro." #: ../../reference/datamodel.rst:150 msgid "None" msgstr "None" #: ../../reference/datamodel.rst:147 msgid "" "This type has a single value. There is a single object with this value. " "This object is accessed through the built-in name ``None``. It is used to " "signify the absence of a value in many situations, e.g., it is returned from " "functions that don't explicitly return anything. Its truth value is false." msgstr "" "Este tipo possui um único valor. Existe um único objeto com este valor. Este " "objeto é acessado através do nome embutido ``None``. É usado para significar " "a ausência de um valor em muitas situações, por exemplo, ele é retornado de " "funções que não retornam nada explicitamente. Seu valor verdade é falso." #: ../../reference/datamodel.rst:170 msgid "NotImplemented" msgstr "NotImplemented" #: ../../reference/datamodel.rst:155 msgid "" "This type has a single value. There is a single object with this value. " "This object is accessed through the built-in name ``NotImplemented``. " "Numeric methods and rich comparison methods should return this value if they " "do not implement the operation for the operands provided. (The interpreter " "will then try the reflected operation, or some other fallback, depending on " "the operator.) It should not be evaluated in a boolean context." msgstr "" "Este tipo possui um único valor. Existe um único objeto com este valor. Este " "objeto é acessado através do nome embutido ``NotImplemented``. Os métodos " "numéricos e métodos de comparação rica devem retornar esse valor se não " "implementarem a operação para os operandos fornecidos. (O interpretador " "tentará então a operação refletida ou alguma outra alternativa, dependendo " "do operador.) Não deve ser avaliado em um contexto booleano." #: ../../reference/datamodel.rst:162 msgid "See :ref:`implementing-the-arithmetic-operations` for more details." msgstr "" "Veja a documentação :ref:`implementing-the-arithmetic-operations` para mais " "detalhes." #: ../../reference/datamodel.rst:166 msgid "" "Evaluating ``NotImplemented`` in a boolean context is deprecated. While it " "currently evaluates as true, it will emit a :exc:`DeprecationWarning`. It " "will raise a :exc:`TypeError` in a future version of Python." msgstr "" "A avaliação de ``NotImplemented`` em um contexto booleano foi descontinuado. " "Embora atualmente seja avaliado como verdadeiro, ele emitirá um :exc:" "`DeprecationWarning`. Ele levantará uma :exc:`TypeError` em uma versão " "futura do Python." #: ../../reference/datamodel.rst:179 msgid "Ellipsis" msgstr "Ellipsis" #: ../../reference/datamodel.rst:177 msgid "" "This type has a single value. There is a single object with this value. " "This object is accessed through the literal ``...`` or the built-in name " "``Ellipsis``. Its truth value is true." msgstr "" "Este tipo possui um único valor. Existe um único objeto com este valor. Este " "objeto é acessado através do literal ``...`` ou do nome embutido " "``Ellipsis`` (reticências). Seu valor verdade é verdadeiro." #: ../../reference/datamodel.rst:266 msgid ":class:`numbers.Number`" msgstr ":class:`numbers.Number`" #: ../../reference/datamodel.rst:184 msgid "" "These are created by numeric literals and returned as results by arithmetic " "operators and arithmetic built-in functions. Numeric objects are immutable; " "once created their value never changes. Python numbers are of course " "strongly related to mathematical numbers, but subject to the limitations of " "numerical representation in computers." msgstr "" "Esses são criados por literais numéricos e retornados como resultados por " "operadores aritméticos e funções aritméticas embutidas. Os objetos numéricos " "são imutáveis; uma vez criado, seu valor nunca muda. Os números do Python " "são, obviamente, fortemente relacionados aos números matemáticos, mas " "sujeitos às limitações da representação numérica em computadores." #: ../../reference/datamodel.rst:190 msgid "" "The string representations of the numeric classes, computed by :meth:" "`~object.__repr__` and :meth:`~object.__str__`, have the following " "properties:" msgstr "" "As representações de string das classes numéricas, calculadas por :meth:" "`~object.__repr__` e :meth:`~object.__str__`, têm as seguintes propriedades:" #: ../../reference/datamodel.rst:194 msgid "" "They are valid numeric literals which, when passed to their class " "constructor, produce an object having the value of the original numeric." msgstr "" "Elas são literais numéricos válidos que, quando passados para seu construtor " "de classe, produzem um objeto com o valor do numérico original." #: ../../reference/datamodel.rst:198 msgid "The representation is in base 10, when possible." msgstr "A representação está na base 10, quando possível." #: ../../reference/datamodel.rst:200 msgid "" "Leading zeros, possibly excepting a single zero before a decimal point, are " "not shown." msgstr "" "Os zeros à esquerda, possivelmente com exceção de um único zero antes de um " "ponto decimal, não são mostrados." #: ../../reference/datamodel.rst:203 msgid "" "Trailing zeros, possibly excepting a single zero after a decimal point, are " "not shown." msgstr "" "Os zeros à direita, possivelmente com exceção de um único zero após um ponto " "decimal, não são mostrados." #: ../../reference/datamodel.rst:206 msgid "A sign is shown only when the number is negative." msgstr "Um sinal é mostrado apenas quando o número é negativo." #: ../../reference/datamodel.rst:208 msgid "" "Python distinguishes between integers, floating point numbers, and complex " "numbers:" msgstr "" "Python distingue entre inteiros, números de ponto flutuante e números " "complexos:" #: ../../reference/datamodel.rst:241 msgid ":class:`numbers.Integral`" msgstr ":class:`numbers.Integral`" #: ../../reference/datamodel.rst:214 msgid "" "These represent elements from the mathematical set of integers (positive and " "negative)." msgstr "" "Estes representam elementos do conjunto matemático de inteiros (positivos e " "negativos)." #: ../../reference/datamodel.rst:217 msgid "There are two types of integers:" msgstr "Existem dois tipos de inteiros:" #: ../../reference/datamodel.rst:224 msgid "Integers (:class:`int`)" msgstr "Inteiros (:class:`int`)" #: ../../reference/datamodel.rst:220 msgid "" "These represent numbers in an unlimited range, subject to available " "(virtual) memory only. For the purpose of shift and mask operations, a " "binary representation is assumed, and negative numbers are represented in a " "variant of 2's complement which gives the illusion of an infinite string of " "sign bits extending to the left." msgstr "" "Estes representam números em um intervalo ilimitado, sujeito apenas à " "memória (virtual) disponível. Para o propósito de operações de deslocamento " "e máscara, uma representação binária é presumida e os números negativos são " "representados em uma variante do complemento de 2 que dá a ilusão de uma " "string infinita de bits de sinal estendendo-se para a esquerda." #: ../../reference/datamodel.rst:236 msgid "Booleans (:class:`bool`)" msgstr "Booleanos (:class:`bool`)" #: ../../reference/datamodel.rst:232 msgid "" "These represent the truth values False and True. The two objects " "representing the values ``False`` and ``True`` are the only Boolean objects. " "The Boolean type is a subtype of the integer type, and Boolean values behave " "like the values 0 and 1, respectively, in almost all contexts, the exception " "being that when converted to a string, the strings ``\"False\"`` or " "``\"True\"`` are returned, respectively." msgstr "" "Estes representam os valores da verdade Falsos e Verdadeiros. Os dois " "objetos que representam os valores ``False`` e ``True`` são os únicos " "objetos booleanos. O tipo booleano é um subtipo do tipo inteiro, e os " "valores booleanos se comportam como os valores 0 e 1, respectivamente, em " "quase todos os contextos, com exceção de que, quando convertidos em uma " "string, as strings ``\"False\"`` ou ``\"True\"`` são retornados, " "respectivamente." #: ../../reference/datamodel.rst:240 msgid "" "The rules for integer representation are intended to give the most " "meaningful interpretation of shift and mask operations involving negative " "integers." msgstr "" "As regras para representação de inteiros têm como objetivo fornecer a " "interpretação mais significativa das operações de deslocamento e máscara " "envolvendo inteiros negativos." #: ../../reference/datamodel.rst:256 msgid ":class:`numbers.Real` (:class:`float`)" msgstr ":class:`numbers.Real` (:class:`float`)" #: ../../reference/datamodel.rst:250 msgid "" "These represent machine-level double precision floating point numbers. You " "are at the mercy of the underlying machine architecture (and C or Java " "implementation) for the accepted range and handling of overflow. Python does " "not support single-precision floating point numbers; the savings in " "processor and memory usage that are usually the reason for using these are " "dwarfed by the overhead of using objects in Python, so there is no reason to " "complicate the language with two kinds of floating point numbers." msgstr "" "Estes representam números de ponto flutuante de precisão dupla no nível da " "máquina. Você está à mercê da arquitetura da máquina subjacente (e " "implementação C ou Java) para o intervalo aceito e tratamento de estouro. " "Python não oferece suporte a números de ponto flutuante de precisão única; a " "economia no uso do processador e da memória, que normalmente é o motivo de " "usá-los, é ofuscada pela sobrecarga do uso de objetos em Python, portanto, " "não há razão para complicar a linguagem com dois tipos de números de ponto " "flutuante." #: ../../reference/datamodel.rst:266 msgid ":class:`numbers.Complex` (:class:`complex`)" msgstr ":class:`numbers.Complex` (:class:`complex`)" #: ../../reference/datamodel.rst:263 msgid "" "These represent complex numbers as a pair of machine-level double precision " "floating point numbers. The same caveats apply as for floating point " "numbers. The real and imaginary parts of a complex number ``z`` can be " "retrieved through the read-only attributes ``z.real`` and ``z.imag``." msgstr "" "Estes representam números complexos como um par de números de ponto " "flutuante de precisão dupla no nível da máquina. As mesmas advertências se " "aplicam aos números de ponto flutuante. As partes reais e imaginárias de um " "número complexo ``z`` podem ser obtidas através dos atributos somente " "leitura ``z.real`` e ``z.imag``." #: ../../reference/datamodel.rst:383 msgid "Sequences" msgstr "Sequências" #: ../../reference/datamodel.rst:276 msgid "" "These represent finite ordered sets indexed by non-negative numbers. The " "built-in function :func:`len` returns the number of items of a sequence. " "When the length of a sequence is *n*, the index set contains the numbers 0, " "1, ..., *n*-1. Item *i* of sequence *a* is selected by ``a[i]``." msgstr "" "Estes representam conjuntos ordenados finitos indexados por números não " "negativos. A função embutida :func:`len` retorna o número de itens de uma " "sequência. Quando o comprimento de uma sequência é *n*, o conjunto de " "índices contém os números 0, 1, ..., *n*-1. O item *i* da sequência *a* é " "selecionado por ``a[i]``." #: ../../reference/datamodel.rst:283 msgid "" "Sequences also support slicing: ``a[i:j]`` selects all items with index *k* " "such that *i* ``<=`` *k* ``<`` *j*. When used as an expression, a slice is " "a sequence of the same type. This implies that the index set is renumbered " "so that it starts at 0." msgstr "" "Sequências também suportam fatiamento: ``a[i:j]`` seleciona todos os itens " "com índice *k* de forma que *i* ``<=`` *k* ``<`` *j*. Quando usada como " "expressão, uma fatia é uma sequência do mesmo tipo. Isso implica que o " "conjunto de índices é renumerado para que comece em 0." #: ../../reference/datamodel.rst:288 msgid "" "Some sequences also support \"extended slicing\" with a third \"step\" " "parameter: ``a[i:j:k]`` selects all items of *a* with index *x* where ``x = " "i + n*k``, *n* ``>=`` ``0`` and *i* ``<=`` *x* ``<`` *j*." msgstr "" "Algumas sequências também suportam \"fatiamento estendido\" com um terceiro " "parâmetro de \"etapa\": ``a[i:j:k]`` seleciona todos os itens de *a* com " "índice *x* onde ``x = i + n*k``, *n* ``>=`` ``0`` e *i* ``<=`` *x* ``<`` *j*." #: ../../reference/datamodel.rst:292 msgid "Sequences are distinguished according to their mutability:" msgstr "As sequências são distinguidas de acordo com sua mutabilidade:" #: ../../reference/datamodel.rst:349 msgid "Immutable sequences" msgstr "Sequências imutáveis" #: ../../reference/datamodel.rst:299 msgid "" "An object of an immutable sequence type cannot change once it is created. " "(If the object contains references to other objects, these other objects may " "be mutable and may be changed; however, the collection of objects directly " "referenced by an immutable object cannot change.)" msgstr "" "Um objeto de um tipo de sequência imutável não pode ser alterado depois de " "criado. (Se o objeto contiver referências a outros objetos, esses outros " "objetos podem ser mutáveis e podem ser alterados; no entanto, a coleção de " "objetos diretamente referenciada por um objeto imutável não pode ser " "alterada.)" #: ../../reference/datamodel.rst:304 msgid "The following types are immutable sequences:" msgstr "Os tipos a seguir são sequências imutáveis:" #: ../../reference/datamodel.rst:327 msgid "Strings" msgstr "Strings" #: ../../reference/datamodel.rst:317 msgid "" "A string is a sequence of values that represent Unicode code points. All the " "code points in the range ``U+0000 - U+10FFFF`` can be represented in a " "string. Python doesn't have a :c:type:`char` type; instead, every code " "point in the string is represented as a string object with length ``1``. " "The built-in function :func:`ord` converts a code point from its string form " "to an integer in the range ``0 - 10FFFF``; :func:`chr` converts an integer " "in the range ``0 - 10FFFF`` to the corresponding length ``1`` string " "object. :meth:`str.encode` can be used to convert a :class:`str` to :class:" "`bytes` using the given text encoding, and :meth:`bytes.decode` can be used " "to achieve the opposite." msgstr "" "Uma string é uma sequência de valores que representam pontos de código " "Unicode. Todos os pontos de código no intervalo ``U+0000 - U+10FFFF`` podem " "ser representados em uma string. Python não tem um tipo :c:type:`char`; em " "vez disso, cada ponto de código na string é representado como um objeto " "string com comprimento ``1``. A função embutida :func:`ord` converte um " "ponto de código de sua forma de string para um inteiro no intervalo ``0 - " "10FFFF``; :func:`chr` converte um inteiro no intervalo ``0 - 10FFFF`` para o " "objeto de string correspondente de comprimento ``1``. :meth:`str.encode` " "pode ser usado para converter uma :class:`str` para :class:`bytes` usando a " "codificação de texto fornecida, e :meth:`bytes.decode` pode ser usado para " "conseguir o oposto." #: ../../reference/datamodel.rst:340 msgid "Tuples" msgstr "Tuplas" #: ../../reference/datamodel.rst:335 msgid "" "The items of a tuple are arbitrary Python objects. Tuples of two or more " "items are formed by comma-separated lists of expressions. A tuple of one " "item (a 'singleton') can be formed by affixing a comma to an expression (an " "expression by itself does not create a tuple, since parentheses must be " "usable for grouping of expressions). An empty tuple can be formed by an " "empty pair of parentheses." msgstr "" "Os itens de uma tupla são objetos Python arbitrários. Tuplas de dois ou mais " "itens são formadas por listas de expressões separadas por vírgulas. Uma " "tupla de um item (um \"singleton\") pode ser formada afixando uma vírgula a " "uma expressão (uma expressão por si só não cria uma tupla, já que os " "parênteses devem ser usados para agrupamento de expressões). Uma tupla vazia " "pode ser formada por um par vazio de parênteses." #: ../../reference/datamodel.rst:349 msgid "Bytes" msgstr "Bytes" #: ../../reference/datamodel.rst:345 msgid "" "A bytes object is an immutable array. The items are 8-bit bytes, " "represented by integers in the range 0 <= x < 256. Bytes literals (like " "``b'abc'``) and the built-in :func:`bytes()` constructor can be used to " "create bytes objects. Also, bytes objects can be decoded to strings via " "the :meth:`~bytes.decode` method." msgstr "" "Um objeto bytes é um vetor imutável. Os itens são bytes de 8 bits, " "representados por inteiros no intervalo 0 <= x < 256. Literais de bytes " "(como ``b'abc'``) e o construtor embutido :func:`bytes()` podem ser usados " "para criar objetos bytes. Além disso, os objetos bytes podem ser " "decodificados em strings através do método :meth:`~bytes.decode`." #: ../../reference/datamodel.rst:383 msgid "Mutable sequences" msgstr "Sequências mutáveis" #: ../../reference/datamodel.rst:359 msgid "" "Mutable sequences can be changed after they are created. The subscription " "and slicing notations can be used as the target of assignment and :keyword:" "`del` (delete) statements." msgstr "" "As sequências mutáveis podem ser alteradas após serem criadas. As notações " "de subscrição e fatiamento podem ser usadas como o destino da atribuição e " "instruções :keyword:`del` (*delete*, exclusão)." #: ../../reference/datamodel.rst:363 msgid "There are currently two intrinsic mutable sequence types:" msgstr "Atualmente, existem dois tipos de sequência mutável intrínseca:" #: ../../reference/datamodel.rst:370 msgid "Lists" msgstr "Listas" #: ../../reference/datamodel.rst:368 msgid "" "The items of a list are arbitrary Python objects. Lists are formed by " "placing a comma-separated list of expressions in square brackets. (Note that " "there are no special cases needed to form lists of length 0 or 1.)" msgstr "" "Os itens de uma lista são objetos Python arbitrários. As listas são formadas " "colocando uma lista de expressões separada por vírgulas entre colchetes. " "(Observe que não há casos especiais necessários para formar listas de " "comprimento 0 ou 1.)" #: ../../reference/datamodel.rst:378 msgid "Byte Arrays" msgstr "Vetores de bytes" #: ../../reference/datamodel.rst:375 msgid "" "A bytearray object is a mutable array. They are created by the built-in :" "func:`bytearray` constructor. Aside from being mutable (and hence " "unhashable), byte arrays otherwise provide the same interface and " "functionality as immutable :class:`bytes` objects." msgstr "" "Um objeto bytearray é um vetor mutável. Eles são criados pelo construtor " "embutido :func:`bytearray`. Além de serem mutáveis (e, portanto, não-" "hasheável), os vetores de bytes fornecem a mesma interface e funcionalidade " "que os objetos imutáveis :class:`bytes`." #: ../../reference/datamodel.rst:382 msgid "" "The extension module :mod:`array` provides an additional example of a " "mutable sequence type, as does the :mod:`collections` module." msgstr "" "O módulo de extensão :mod:`array` fornece um exemplo adicional de um tipo de " "sequência mutável, assim como o módulo :mod:`collections`." #: ../../reference/datamodel.rst:417 msgid "Set types" msgstr "Tipos de conjuntos" #: ../../reference/datamodel.rst:390 msgid "" "These represent unordered, finite sets of unique, immutable objects. As " "such, they cannot be indexed by any subscript. However, they can be iterated " "over, and the built-in function :func:`len` returns the number of items in a " "set. Common uses for sets are fast membership testing, removing duplicates " "from a sequence, and computing mathematical operations such as intersection, " "union, difference, and symmetric difference." msgstr "" "Estes representam conjuntos finitos e não ordenados de objetos únicos e " "imutáveis. Como tal, eles não podem ser indexados por nenhum subscrito. No " "entanto, eles podem ser iterados, e a função embutida :func:`len` retorna o " "número de itens em um conjunto. Os usos comuns para conjuntos são testes " "rápidos de associação, remoção de duplicatas de uma sequência e computação " "de operações matemáticas como interseção, união, diferença e diferença " "simétrica." #: ../../reference/datamodel.rst:397 msgid "" "For set elements, the same immutability rules apply as for dictionary keys. " "Note that numeric types obey the normal rules for numeric comparison: if two " "numbers compare equal (e.g., ``1`` and ``1.0``), only one of them can be " "contained in a set." msgstr "" "Para elementos de conjunto, as mesmas regras de imutabilidade se aplicam às " "chaves de dicionário. Observe que os tipos numéricos obedecem às regras " "normais para comparação numérica: se dois números forem iguais (por exemplo, " "``1`` e ``1.0``), apenas um deles pode estar contido em um conjunto." #: ../../reference/datamodel.rst:402 msgid "There are currently two intrinsic set types:" msgstr "Atualmente, existem dois tipos de conjuntos intrínsecos:" #: ../../reference/datamodel.rst:409 msgid "Sets" msgstr "Conjuntos" #: ../../reference/datamodel.rst:407 msgid "" "These represent a mutable set. They are created by the built-in :func:`set` " "constructor and can be modified afterwards by several methods, such as :meth:" "`~set.add`." msgstr "" "Estes representam um conjunto mutável. Eles são criados pelo construtor " "embutido :func:`set` e podem ser modificados posteriormente por vários " "métodos, como :meth:`~set.add`." #: ../../reference/datamodel.rst:417 msgid "Frozen sets" msgstr "Conjuntos congelados" #: ../../reference/datamodel.rst:414 msgid "" "These represent an immutable set. They are created by the built-in :func:" "`frozenset` constructor. As a frozenset is immutable and :term:`hashable`, " "it can be used again as an element of another set, or as a dictionary key." msgstr "" "Estes representam um conjunto imutável. Eles são criados pelo construtor " "embutido :func:`frozenset`. Como um frozenset é imutável e :term:`hasheável " "<hashable>`, ele pode ser usado novamente como um elemento de outro " "conjunto, ou como uma chave de dicionário." #: ../../reference/datamodel.rst:464 msgid "Mappings" msgstr "Mapeamentos" #: ../../reference/datamodel.rst:425 msgid "" "These represent finite sets of objects indexed by arbitrary index sets. The " "subscript notation ``a[k]`` selects the item indexed by ``k`` from the " "mapping ``a``; this can be used in expressions and as the target of " "assignments or :keyword:`del` statements. The built-in function :func:`len` " "returns the number of items in a mapping." msgstr "" "Eles representam conjuntos finitos de objetos indexados por conjuntos de " "índices arbitrários. A notação subscrito ``a[k]`` seleciona o item indexado " "por ``k`` do mapeamento ``a``; isso pode ser usado em expressões e como alvo " "de atribuições ou instruções :keyword:`del`. A função embutida :func:`len` " "retorna o número de itens em um mapeamento." #: ../../reference/datamodel.rst:431 msgid "There is currently a single intrinsic mapping type:" msgstr "Atualmente, há um único tipo de mapeamento intrínseco:" #: ../../reference/datamodel.rst:464 msgid "Dictionaries" msgstr "Dicionários" #: ../../reference/datamodel.rst:436 msgid "" "These represent finite sets of objects indexed by nearly arbitrary values. " "The only types of values not acceptable as keys are values containing lists " "or dictionaries or other mutable types that are compared by value rather " "than by object identity, the reason being that the efficient implementation " "of dictionaries requires a key's hash value to remain constant. Numeric " "types used for keys obey the normal rules for numeric comparison: if two " "numbers compare equal (e.g., ``1`` and ``1.0``) then they can be used " "interchangeably to index the same dictionary entry." msgstr "" "Eles representam conjuntos finitos de objetos indexados por valores quase " "arbitrários. Os únicos tipos de valores não aceitáveis como chaves são os " "valores que contêm listas ou dicionários ou outros tipos mutáveis que são " "comparados por valor em vez de por identidade de objeto, o motivo é que a " "implementação eficiente de dicionários requer que o valor de hash de uma " "chave permaneça constante. Os tipos numéricos usados para chaves obedecem às " "regras normais para comparação numérica: se dois números forem iguais (por " "exemplo, ``1`` e ``1.0``), eles podem ser usados alternadamente para indexar " "a mesma entrada do dicionário." #: ../../reference/datamodel.rst:445 msgid "" "Dictionaries preserve insertion order, meaning that keys will be produced in " "the same order they were added sequentially over the dictionary. Replacing " "an existing key does not change the order, however removing a key and re-" "inserting it will add it to the end instead of keeping its old place." msgstr "" "Dicionários preservam a ordem de inserção, o que significa que as chaves " "serão produzidas na mesma ordem em que foram adicionadas sequencialmente no " "dicionário. Substituir uma chave existente não altera a ordem, no entanto, " "remover uma chave e inseri-la novamente irá adicioná-la ao final em vez de " "manter seu lugar anterior." #: ../../reference/datamodel.rst:450 msgid "" "Dictionaries are mutable; they can be created by the ``{...}`` notation (see " "section :ref:`dict`)." msgstr "" "Os dicionários são mutáveis; eles podem ser criados pela notação ``{...}`` " "(veja a seção :ref:`dict`)." #: ../../reference/datamodel.rst:457 msgid "" "The extension modules :mod:`dbm.ndbm` and :mod:`dbm.gnu` provide additional " "examples of mapping types, as does the :mod:`collections` module." msgstr "" "Os módulos de extensão :mod:`dbm.ndbm` e :mod:`dbm.gnu` fornecem exemplos " "adicionais de tipos de mapeamento, assim como o módulo :mod:`collections`." #: ../../reference/datamodel.rst:461 msgid "" "Dictionaries did not preserve insertion order in versions of Python before " "3.6. In CPython 3.6, insertion order was preserved, but it was considered an " "implementation detail at that time rather than a language guarantee." msgstr "" "Dicionários não preservavam a ordem de inserção nas versões do Python " "anteriores à 3.6. No CPython 3.6, a ordem de inserção foi preservada, mas " "foi considerada um detalhe de implementação naquela época, em vez de uma " "garantia da linguagem." #: ../../reference/datamodel.rst:723 msgid "Callable types" msgstr "Tipos chamáveis" #: ../../reference/datamodel.rst:473 msgid "" "These are the types to which the function call operation (see section :ref:" "`calls`) can be applied:" msgstr "" "Estes são os tipos aos quais a operação de chamada de função (veja a seção :" "ref:`calls`) pode ser aplicada:" #: ../../reference/datamodel.rst:576 msgid "User-defined functions" msgstr "Funções definidas pelo usuário" #: ../../reference/datamodel.rst:482 msgid "" "A user-defined function object is created by a function definition (see " "section :ref:`function`). It should be called with an argument list " "containing the same number of items as the function's formal parameter list." msgstr "" "Um objeto função definido pelo usuário será criado pela definição de função " "(veja a seção :ref:`function`). A mesma deverá ser invocada com uma lista de " "argumentos contendo o mesmo número de itens que a lista de parâmetros " "formais da função." #: ../../reference/datamodel.rst:487 msgid "Special attributes:" msgstr "Atributos especiais:" #: ../../reference/datamodel.rst:505 msgid "Attribute" msgstr "Atributo" #: ../../reference/datamodel.rst:505 msgid "Meaning" msgstr "Significado" #: ../../reference/datamodel.rst:507 msgid ":attr:`__doc__`" msgstr ":attr:`__doc__`" #: ../../reference/datamodel.rst:507 msgid "" "The function's documentation string, or ``None`` if unavailable; not " "inherited by subclasses." msgstr "" "A string de documentação da função, ou ``None`` se indisponível; não herdado " "por subclasses." #: ../../reference/datamodel.rst:507 ../../reference/datamodel.rst:512 #: ../../reference/datamodel.rst:515 ../../reference/datamodel.rst:520 #: ../../reference/datamodel.rst:524 ../../reference/datamodel.rst:530 #: ../../reference/datamodel.rst:540 ../../reference/datamodel.rst:551 #: ../../reference/datamodel.rst:558 msgid "Writable" msgstr "Gravável" #: ../../reference/datamodel.rst:512 msgid ":attr:`~definition.\\ __name__`" msgstr ":attr:`~definition.\\ __name__`" #: ../../reference/datamodel.rst:512 msgid "The function's name." msgstr "O nome da função." #: ../../reference/datamodel.rst:515 msgid ":attr:`~definition.\\ __qualname__`" msgstr ":attr:`~definition.\\ __qualname__`" #: ../../reference/datamodel.rst:515 msgid "The function's :term:`qualified name`." msgstr "O :term:`nome qualificado <qualified name>` da função." #: ../../reference/datamodel.rst:520 msgid ":attr:`__module__`" msgstr ":attr:`__module__`" #: ../../reference/datamodel.rst:520 msgid "" "The name of the module the function was defined in, or ``None`` if " "unavailable." msgstr "" "O nome do módulo em que a função foi definida ou ``None`` se indisponível." #: ../../reference/datamodel.rst:524 msgid ":attr:`__defaults__`" msgstr ":attr:`__defaults__`" #: ../../reference/datamodel.rst:524 msgid "" "A tuple containing default argument values for those arguments that have " "defaults, or ``None`` if no arguments have a default value." msgstr "" "Uma tupla contendo valores de argumento padrão para aqueles argumentos que " "possuem padrões, ou ``None`` se nenhum argumento tiver um valor padrão." #: ../../reference/datamodel.rst:530 msgid ":attr:`__code__`" msgstr ":attr:`__code__`" #: ../../reference/datamodel.rst:530 msgid "The code object representing the compiled function body." msgstr "O objeto código que representa o corpo da função compilada." #: ../../reference/datamodel.rst:533 msgid ":attr:`__globals__`" msgstr ":attr:`__globals__`" #: ../../reference/datamodel.rst:533 msgid "" "A reference to the dictionary that holds the function's global variables --- " "the global namespace of the module in which the function was defined." msgstr "" "Uma referência ao dicionário que contém as variáveis globais da função --- o " "espaço de nomes global do módulo no qual a função foi definida." #: ../../reference/datamodel.rst:533 ../../reference/datamodel.rst:544 msgid "Read-only" msgstr "Somente leitura" #: ../../reference/datamodel.rst:540 msgid ":attr:`~object.__dict__`" msgstr ":attr:`~object.__dict__`" #: ../../reference/datamodel.rst:540 msgid "The namespace supporting arbitrary function attributes." msgstr "" "O espaço de nomes que oferece suporte a atributos de função arbitrários." #: ../../reference/datamodel.rst:544 msgid ":attr:`__closure__`" msgstr ":attr:`__closure__`" #: ../../reference/datamodel.rst:544 msgid "" "``None`` or a tuple of cells that contain bindings for the function's free " "variables. See below for information on the ``cell_contents`` attribute." msgstr "" "``None`` ou uma tupla de células que contêm ligações para as variáveis " "livres da função. Veja abaixo as informações sobre o atributo " "``cell_contents``." #: ../../reference/datamodel.rst:551 msgid ":attr:`__annotations__`" msgstr ":attr:`__annotations__`" #: ../../reference/datamodel.rst:551 msgid "" "A dict containing annotations of parameters. The keys of the dict are the " "parameter names, and ``'return'`` for the return annotation, if provided." msgstr "" "Um dicionário contendo anotações de parâmetros. As chaves do dict são os " "nomes dos parâmetros e ``'return'`` para a anotação de retorno, se fornecida." #: ../../reference/datamodel.rst:558 msgid ":attr:`__kwdefaults__`" msgstr ":attr:`__kwdefaults__`" #: ../../reference/datamodel.rst:558 msgid "A dict containing defaults for keyword-only parameters." msgstr "Um dicionário contendo padrões para parâmetros somente-nomeados." #: ../../reference/datamodel.rst:562 msgid "" "Most of the attributes labelled \"Writable\" check the type of the assigned " "value." msgstr "" "A maioria dos atributos rotulados como \"Gravável\" verifica o tipo do valor " "atribuído." #: ../../reference/datamodel.rst:564 msgid "" "Function objects also support getting and setting arbitrary attributes, " |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |