# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2021, Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # # Translators: # Claudio Rogerio Carvalho Filho , 2021 # Leticia Portella , 2021 # Adson Rodrigues , 2021 # Adorilson Bezerra , 2021 # Rafael Fontenelle , 2021 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-08-18 13:46+0000\n" "PO-Revision-Date: 2021-06-28 01:50+0000\n" "Last-Translator: Rafael Fontenelle , 2021\n" "Language-Team: Portuguese (Brazil) (https://www.transifex.com/python-doc/" "teams/5390/pt_BR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: pt_BR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #: ../../tutorial/introduction.rst:5 msgid "An Informal Introduction to Python" msgstr "Uma introdução informal ao Python" #: ../../tutorial/introduction.rst:7 msgid "" "In the following examples, input and output are distinguished by the " "presence or absence of prompts (:term:`>>>` and :term:`...`): to repeat the " "example, you must type everything after the prompt, when the prompt appears; " "lines that do not begin with a prompt are output from the interpreter. Note " "that a secondary prompt on a line by itself in an example means you must " "type a blank line; this is used to end a multi-line command." msgstr "" "Nos exemplos seguintes, pode-se distinguir entrada e saída pela presença ou " "ausência dos prompts (:term:`>>>` e :term:`...`): para repetir o exemplo, " "você deve digitar tudo após o prompt, quando o mesmo aparece; linhas que não " "começarem com um prompt são na verdade as saídas geradas pelo interpretador. " "Observe que quando aparece uma linha contendo apenas o prompt secundário " "você deve digitar uma linha em branco; é assim que se encerra um comando de " "múltiplas linhas." #: ../../tutorial/introduction.rst:16 msgid "" "Many of the examples in this manual, even those entered at the interactive " "prompt, include comments. Comments in Python start with the hash character, " "``#``, and extend to the end of the physical line. A comment may appear at " "the start of a line or following whitespace or code, but not within a string " "literal. A hash character within a string literal is just a hash character. " "Since comments are to clarify code and are not interpreted by Python, they " "may be omitted when typing in examples." msgstr "" "Muitos exemplos neste manual, mesmo aqueles inscritos na linha de comando " "interativa, incluem comentários. Comentários em Python começam com o " "caractere cerquilha '#' e estende até o final da linha. Um comentário pode " "aparecer no inicio da linha ou após espaço em branco ou código, mas não " "dentro de uma string literal. O caracterer cerquilha dentro de uma string " "literal é apenas uma cerquilha. Como os comentários são para esclarecer o " "código e não são interpretados pelo Python, eles podem ser omitidos ao " "digitar exemplos." #: ../../tutorial/introduction.rst:24 msgid "Some examples::" msgstr "Alguns exemplos:" #: ../../tutorial/introduction.rst:35 msgid "Using Python as a Calculator" msgstr "Usando Python como uma calculadora" #: ../../tutorial/introduction.rst:37 msgid "" "Let's try some simple Python commands. Start the interpreter and wait for " "the primary prompt, ``>>>``. (It shouldn't take long.)" msgstr "" "Vamos experimentar alguns comandos simples em Python. Inicie o interpretador " "e aguarde o prompt primário, ``>>>``. (Não deve demorar muito.)" #: ../../tutorial/introduction.rst:44 msgid "Numbers" msgstr "Números" #: ../../tutorial/introduction.rst:46 msgid "" "The interpreter acts as a simple calculator: you can type an expression at " "it and it will write the value. Expression syntax is straightforward: the " "operators ``+``, ``-``, ``*`` and ``/`` work just like in most other " "languages (for example, Pascal or C); parentheses (``()``) can be used for " "grouping. For example::" msgstr "" "O interpretador funciona como uma calculadora bem simples: você pode digitar " "uma expressão e o resultado será apresentado. A sintaxe de expressões é a " "usual: operadores ``+``, ``-``, ``*`` e ``/`` funcionam da mesma forma que " "em outras linguagens tradicionais (por exemplo, Pascal ou C); parênteses " "(``()``) podem ser usados para agrupar expressões. Por exemplo::" #: ../../tutorial/introduction.rst:61 msgid "" "The integer numbers (e.g. ``2``, ``4``, ``20``) have type :class:`int`, the " "ones with a fractional part (e.g. ``5.0``, ``1.6``) have type :class:" "`float`. We will see more about numeric types later in the tutorial." msgstr "" "Os números inteiros (ex. ``2``, ``4``, ``20``) são do tipo :class:`int`, " "aqueles com parte fracionária (ex. ``5.0``, ``1.6``) são do tipo :class:" "`float`. Veremos mais sobre tipos numéricos posteriormente neste tutorial." #: ../../tutorial/introduction.rst:65 msgid "" "Division (``/``) always returns a float. To do :term:`floor division` and " "get an integer result (discarding any fractional result) you can use the ``//" "`` operator; to calculate the remainder you can use ``%``::" msgstr "" "Divisão (``/``) sempre retorna ponto flutuante (float). Para fazer uma :term:" "`divisão pelo piso` e receber um inteiro como resultado (descartando a parte " "fracionária) você pode usar o operador ``//``; para calcular o resto você " "pode usar o ``%``::" #: ../../tutorial/introduction.rst:79 msgid "" "With Python, it is possible to use the ``**`` operator to calculate powers " "[#]_::" msgstr "" "Com Python, é possível usar o operador ``**`` para calcular potências [#]_::" #: ../../tutorial/introduction.rst:86 msgid "" "The equal sign (``=``) is used to assign a value to a variable. Afterwards, " "no result is displayed before the next interactive prompt::" msgstr "" "O sinal de igual (``'='``) é usado para atribuir um valor a uma variável. " "Depois de uma atribuição, nenhum resultado é exibido antes do próximo " "prompt::" #: ../../tutorial/introduction.rst:94 msgid "" "If a variable is not \"defined\" (assigned a value), trying to use it will " "give you an error::" msgstr "" "Se uma variável não é \"definida\" (não tem um valor atribuído), tentar " "utilizá-la gerará um erro::" #: ../../tutorial/introduction.rst:102 msgid "" "There is full support for floating point; operators with mixed type operands " "convert the integer operand to floating point::" msgstr "" "Há suporte completo para ponto flutuante (*float*); operadores com operandos " "de diferentes tipos convertem o inteiro para ponto flutuante::" #: ../../tutorial/introduction.rst:108 msgid "" "In interactive mode, the last printed expression is assigned to the variable " "``_``. This means that when you are using Python as a desk calculator, it " "is somewhat easier to continue calculations, for example::" msgstr "" "No modo interativo, o valor da última expressão exibida é atribuída a " "variável ``_``. Assim, ao utilizar Python como uma calculadora, fica mais " "fácil prosseguir com os cálculos, por exemplo::" #: ../../tutorial/introduction.rst:121 msgid "" "This variable should be treated as read-only by the user. Don't explicitly " "assign a value to it --- you would create an independent local variable with " "the same name masking the built-in variable with its magic behavior." msgstr "" "Essa variável especial deve ser tratada como *somente para leitura* pelo " "usuário. Nunca lhe atribua explicitamente um valor --- do contrário, estaria " "criando uma outra variável (homônima) independente, que mascararia a " "variável especial com seu comportamento mágico." #: ../../tutorial/introduction.rst:125 msgid "" "In addition to :class:`int` and :class:`float`, Python supports other types " "of numbers, such as :class:`~decimal.Decimal` and :class:`~fractions." "Fraction`. Python also has built-in support for :ref:`complex numbers " "`, and uses the ``j`` or ``J`` suffix to indicate the " "imaginary part (e.g. ``3+5j``)." msgstr "" "Além de :class:`int` e :class:`float`, o Python suporta outros tipos de " "números, tais como :class:`~decimal.Decimal` e :class:`~fractions.Fraction`. " "O Python também possui suporte nativo a :ref:`números complexos " "`, e usa os sufixos ``j`` ou ``J`` para indicar a parte " "imaginária (por exemplo, ``3+5j``)." #: ../../tutorial/introduction.rst:135 msgid "Strings" msgstr "Strings" #: ../../tutorial/introduction.rst:137 msgid "" "Besides numbers, Python can also manipulate strings, which can be expressed " "in several ways. They can be enclosed in single quotes (``'...'``) or " "double quotes (``\"...\"``) with the same result [#]_. ``\\`` can be used " "to escape quotes::" msgstr "" "Além de números, Python também pode manipular strings (sequências de " "caracteres), que podem ser expressas de diversas formas. Elas podem ser " "delimitadas por aspas simples (``'...'``) ou duplas (``\"...\"``) e teremos " "o mesmo resultado [#]_. ``\\`` pode ser usada para escapar aspas::" #: ../../tutorial/introduction.rst:155 msgid "" "In the interactive interpreter, the output string is enclosed in quotes and " "special characters are escaped with backslashes. While this might sometimes " "look different from the input (the enclosing quotes could change), the two " "strings are equivalent. The string is enclosed in double quotes if the " "string contains a single quote and no double quotes, otherwise it is " "enclosed in single quotes. The :func:`print` function produces a more " "readable output, by omitting the enclosing quotes and by printing escaped " "and special characters::" msgstr "" "Na interpretação interativa, a string de saída é delimitada com aspas e " "caracteres especiais são escapados com barras invertidas. Embora isso possa " "às vezes parecer diferente da entrada (as aspas podem mudar), as duas " "strings são equivalentes. A string é delimitada com aspas duplas se a string " "contiver uma única aspa simples e nenhuma aspa dupla, caso contrário, ela é " "delimitada com aspas simples. A função :func:`print` produz uma saída mais " "legível, ao omitir as aspas e ao imprimir caracteres escapados e especiais::" #: ../../tutorial/introduction.rst:175 msgid "" "If you don't want characters prefaced by ``\\`` to be interpreted as special " "characters, you can use *raw strings* by adding an ``r`` before the first " "quote::" msgstr "" "Se não quiseres que os caracteres sejam precedidos por ``\\`` para serem " "interpretados como caracteres especiais, poderás usar *strings raw* (N.d.T: " "“crua” ou sem processamento de caracteres de escape) adicionando um ``r`` " "antes da primeira aspa::" #: ../../tutorial/introduction.rst:185 msgid "" "String literals can span multiple lines. One way is using triple-quotes: ``" "\"\"\"...\"\"\"`` or ``'''...'''``. End of lines are automatically included " "in the string, but it's possible to prevent this by adding a ``\\`` at the " "end of the line. The following example::" msgstr "" "As strings literais podem abranger várias linhas. Uma maneira é usar as " "aspas triplas: ``\"\"\"...\"\"\"`` ou ``'''...'''``. O fim das linhas é " "incluído automaticamente na string, mas é possível evitar isso adicionando " "uma ``\\`` no final. O seguinte exemplo::" #: ../../tutorial/introduction.rst:196 msgid "" "produces the following output (note that the initial newline is not " "included):" msgstr "" "produz a seguinte saída (observe que a linha inicial não está incluída):" #: ../../tutorial/introduction.rst:204 msgid "" "Strings can be concatenated (glued together) with the ``+`` operator, and " "repeated with ``*``::" msgstr "" "Strings podem ser concatenadas (coladas) com o operador ``+``, e repetidas " "com ``*``::" #: ../../tutorial/introduction.rst:211 msgid "" "Two or more *string literals* (i.e. the ones enclosed between quotes) next " "to each other are automatically concatenated. ::" msgstr "" "Duas ou mais *strings literais* (ou seja, entre aspas) ao lado da outra são " "automaticamente concatenados. ::" #: ../../tutorial/introduction.rst:217 msgid "" "This feature is particularly useful when you want to break long strings::" msgstr "" "Esse recurso é particularmente útil quando você quer quebrar strings longas::" #: ../../tutorial/introduction.rst:224 msgid "" "This only works with two literals though, not with variables or expressions::" msgstr "" "Isso só funciona com duas strings literais, não com variáveis ou expressões::" #: ../../tutorial/introduction.rst:238 msgid "" "If you want to concatenate variables or a variable and a literal, use ``+``::" msgstr "" "Se você quiser concatenar variáveis ou uma variável e uma literal, use ``" "+``::" #: ../../tutorial/introduction.rst:243 msgid "" "Strings can be *indexed* (subscripted), with the first character having " "index 0. There is no separate character type; a character is simply a string " "of size one::" msgstr "" "As strings podem ser *indexadas* (subscritas), com o primeiro caractere como " "índice 0. Não existe um tipo específico para caracteres; um caractere é " "simplesmente uma string cujo tamanho é 1::" #: ../../tutorial/introduction.rst:253 msgid "" "Indices may also be negative numbers, to start counting from the right::" msgstr "" "Índices também podem ser números negativos para iniciar a contagem pela " "direita::" #: ../../tutorial/introduction.rst:262 msgid "Note that since -0 is the same as 0, negative indices start from -1." msgstr "Note que dado que -0 é o mesmo que 0, índices negativos começam em -1." #: ../../tutorial/introduction.rst:264 msgid "" "In addition to indexing, *slicing* is also supported. While indexing is " "used to obtain individual characters, *slicing* allows you to obtain " "substring::" msgstr "" "Além da indexação, o *fatiamento* também é permitido. Embora a indexação " "seja usada para obter caracteres individuais, *fatiar* permite que você " "obtenha substring::" #: ../../tutorial/introduction.rst:272 msgid "" "Slice indices have useful defaults; an omitted first index defaults to zero, " "an omitted second index defaults to the size of the string being sliced. ::" msgstr "" "Os índices do fatiamento possuem padrões úteis; um primeiro índice omitido " "padrão é zero, um segundo índice omitido é por padrão o tamanho da string " "sendo fatiada::" #: ../../tutorial/introduction.rst:282 msgid "" "Note how the start is always included, and the end always excluded. This " "makes sure that ``s[:i] + s[i:]`` is always equal to ``s``::" msgstr "" "Observe como o início sempre está incluído, e o fim sempre é excluído. Isso " "garante que ``s[:i] + s[i:]`` seja sempre igual a ``s``::" #: ../../tutorial/introduction.rst:290 msgid "" "One way to remember how slices work is to think of the indices as pointing " "*between* characters, with the left edge of the first character numbered 0. " "Then the right edge of the last character of a string of *n* characters has " "index *n*, for example::" msgstr "" "Uma maneira de lembrar como fatias funcionam é pensar que os índices indicam " "posições *entre* caracteres, onde a borda esquerda do primeiro caractere é " "0. Assim, a borda direita do último caractere de uma string de comprimento " "*n* tem índice *n*, por exemplo::" #: ../../tutorial/introduction.rst:301 msgid "" "The first row of numbers gives the position of the indices 0...6 in the " "string; the second row gives the corresponding negative indices. The slice " "from *i* to *j* consists of all characters between the edges labeled *i* and " "*j*, respectively." msgstr "" "A primeira fileira de números indica a posição dos índices 0...6 na string; " "a segunda fileira indica a posição dos respectivos índices negativos. Uma " "fatia de *i* a *j* consiste em todos os caracteres entre as bordas *i* e " "*j*, respectivamente." #: ../../tutorial/introduction.rst:306 msgid "" "For non-negative indices, the length of a slice is the difference of the " "indices, if both are within bounds. For example, the length of " "``word[1:3]`` is 2." msgstr "" "Para índices positivos, o comprimento da fatia é a diferença entre os " "índices, se ambos estão dentro dos limites da string. Por exemplo, o " "comprimento de ``word[1:3]`` é 2." #: ../../tutorial/introduction.rst:310 msgid "Attempting to use an index that is too large will result in an error::" msgstr "" "A tentativa de usar um índice que seja muito grande resultará em um erro::" #: ../../tutorial/introduction.rst:317 msgid "" "However, out of range slice indexes are handled gracefully when used for " "slicing::" msgstr "" "No entanto, os índices de fatiamento fora do alcance são tratados " "graciosamente (N.d.T: o termo original “gracefully” indica robustez no " "tratamento de erros) quando usados para fatiamento. Um índice maior que o " "comprimento é trocado pelo comprimento, um limite superior menor que o " "limite inferior produz uma string vazia::" #: ../../tutorial/introduction.rst:325 msgid "" "Python strings cannot be changed --- they are :term:`immutable`. Therefore, " "assigning to an indexed position in the string results in an error::" msgstr "" "As strings do Python não podem ser alteradas --- uma string é :term:" "`imutável`. Portanto, atribuir a uma posição indexada na sequência resulta " "em um erro::" #: ../../tutorial/introduction.rst:337 msgid "If you need a different string, you should create a new one::" msgstr "Se você precisar de uma string diferente, deverá criar uma nova::" #: ../../tutorial/introduction.rst:344 msgid "The built-in function :func:`len` returns the length of a string::" msgstr "A função embutida :func:`len` devolve o comprimento de uma string::" #: ../../tutorial/introduction.rst:355 msgid ":ref:`textseq`" msgstr ":ref:`textseq`" #: ../../tutorial/introduction.rst:354 msgid "" "Strings are examples of *sequence types*, and support the common operations " "supported by such types." msgstr "" "As strings são exemplos de *tipos de sequências* e suportam as operações " "comumente suportadas por esses tipos." #: ../../tutorial/introduction.rst:359 msgid ":ref:`string-methods`" msgstr ":ref:`string-methods`" #: ../../tutorial/introduction.rst:358 msgid "" "Strings support a large number of methods for basic transformations and " "searching." msgstr "" "As strings suportam uma grande quantidade de métodos para transformações " "básicas e busca." #: ../../tutorial/introduction.rst:362 msgid ":ref:`f-strings`" msgstr ":ref:`f-strings`" #: ../../tutorial/introduction.rst:362 msgid "String literals that have embedded expressions." msgstr "Strings literais que possuem expressões embutidas." #: ../../tutorial/introduction.rst:365 msgid ":ref:`formatstrings`" msgstr ":ref:`formatstrings`" #: ../../tutorial/introduction.rst:365 msgid "Information about string formatting with :meth:`str.format`." msgstr "" "Informações sobre formatação de string com o método :meth:`str.format`." #: ../../tutorial/introduction.rst:368 msgid ":ref:`old-string-formatting`" msgstr ":ref:`old-string-formatting`" #: ../../tutorial/introduction.rst:368 msgid "" "The old formatting operations invoked when strings are the left operand of " "the ``%`` operator are described in more detail here." msgstr "" "As antigas operações de formatação invocadas quando as strings são o " "operando esquerdo do operador ``%`` são descritas com mais detalhes aqui." #: ../../tutorial/introduction.rst:375 msgid "Lists" msgstr "Listas" #: ../../tutorial/introduction.rst:377 msgid "" "Python knows a number of *compound* data types, used to group together other " "values. The most versatile is the *list*, which can be written as a list of " "comma-separated values (items) between square brackets. Lists might contain " "items of different types, but usually the items all have the same type. ::" msgstr "" "Python inclui diversas estruturas de dados *compostas*, usadas para agrupar " "outros valores. A mais versátil é *list* (lista), que pode ser escrita como " "uma lista de valores (itens) separados por vírgula, entre colchetes. Os " "valores contidos na lista não precisam ser todos do mesmo tipo. ::" #: ../../tutorial/introduction.rst:386 msgid "" "Like strings (and all other built-in :term:`sequence` types), lists can be " "indexed and sliced::" msgstr "" "Como strings (e todos os tipos embutidos de :term:`sequência`), listas pode " "ser indexados e fatiados::" #: ../../tutorial/introduction.rst:396 msgid "" "All slice operations return a new list containing the requested elements. " "This means that the following slice returns a :ref:`shallow copy " "` of the list::" msgstr "" "Todas as operações de fatiamento devolvem uma nova lista contendo os " "elementos solicitados. Isso significa que o seguinte fatiamento devolve uma :" "ref:`cópia rasa` da lista::" #: ../../tutorial/introduction.rst:403 msgid "Lists also support operations like concatenation::" msgstr "As listas também suportam operações como concatenação::" #: ../../tutorial/introduction.rst:408 msgid "" "Unlike strings, which are :term:`immutable`, lists are a :term:`mutable` " "type, i.e. it is possible to change their content::" msgstr "" "Diferentemente de strings, que são :term:`imutáveis`, listas são :" "term:`mutáveis`, ou seja, é possível alterar elementos individuais " "de uma lista::" #: ../../tutorial/introduction.rst:418 msgid "" "You can also add new items at the end of the list, by using the :meth:`~list." "append` *method* (we will see more about methods later)::" msgstr "" "Você também pode adicionar novos itens no final da lista, usando o *método* :" "meth:`~list.append` (estudaremos mais a respeito dos métodos " "posteriormente)::" #: ../../tutorial/introduction.rst:426 msgid "" "Assignment to slices is also possible, and this can even change the size of " "the list or clear it entirely::" msgstr "" "Atribuição a fatias também é possível, e isso pode até alterar o tamanho da " "lista ou remover todos os itens dela::" #: ../../tutorial/introduction.rst:445 msgid "The built-in function :func:`len` also applies to lists::" msgstr "A função embutida :func:`len` também se aplica a listas::" #: ../../tutorial/introduction.rst:451 msgid "" "It is possible to nest lists (create lists containing other lists), for " "example::" msgstr "" "É possível aninhar listas (criar listas contendo outras listas), por " "exemplo::" #: ../../tutorial/introduction.rst:467 msgid "First Steps Towards Programming" msgstr "Primeiros passos para a programação" #: ../../tutorial/introduction.rst:469 msgid "" "Of course, we can use Python for more complicated tasks than adding two and " "two together. For instance, we can write an initial sub-sequence of the " "`Fibonacci series `_ as " "follows::" msgstr "" "Claro, podemos usar o Python para tarefas mais complicadas do que somar 2+2. " "Por exemplo, podemos escrever o início da `sequência de Fibonacci `_ assim::" #: ../../tutorial/introduction.rst:489 msgid "This example introduces several new features." msgstr "Este exemplo introduz diversas características ainda não mencionadas." #: ../../tutorial/introduction.rst:491 msgid "" "The first line contains a *multiple assignment*: the variables ``a`` and " "``b`` simultaneously get the new values 0 and 1. On the last line this is " "used again, demonstrating that the expressions on the right-hand side are " "all evaluated first before any of the assignments take place. The right-" "hand side expressions are evaluated from the left to the right." msgstr "" "A primeira linha contém uma atribuição múltipla: as variáveis ``a`` e ``b`` " "recebem simultaneamente os novos valores 0 e 1. Na última linha há outro " "exemplo de atribuição múltipla demonstrando que expressões do lado direito " "são sempre avaliadas primeiro, antes da atribuição. As expressões do lado " "direito são avaliadas da esquerda para a direita." #: ../../tutorial/introduction.rst:497 msgid "" "The :keyword:`while` loop executes as long as the condition (here: ``a < " "10``) remains true. In Python, like in C, any non-zero integer value is " "true; zero is false. The condition may also be a string or list value, in " "fact any sequence; anything with a non-zero length is true, empty sequences " "are false. The test used in the example is a simple comparison. The " "standard comparison operators are written the same as in C: ``<`` (less " "than), ``>`` (greater than), ``==`` (equal to), ``<=`` (less than or equal " "to), ``>=`` (greater than or equal to) and ``!=`` (not equal to)." msgstr "" "O laço de repetição :keyword:`while` executa enquanto a condição (aqui: ``a " "< 10``) permanece verdadeira. Em Python, como em C, qualquer valor inteiro " "que não seja zero é considerado verdadeiro; zero é considerado falso. A " "condição pode também ser uma cadeia de caracteres ou uma lista, ou qualquer " "sequência; qualquer coisa com um tamanho maior que zero é verdadeiro, " "enquanto sequências vazias são falsas. O teste usado no exemplo é uma " "comparação simples. Os operadores padrões de comparação são os mesmos de C: " "``<`` (menor que), ``>`` (maior que), ``==`` (igual), ``<=`` (menor ou " "igual), ``>=`` (maior ou igual) e ``!=`` (diferente)." #: ../../tutorial/introduction.rst:506 msgid "" "The *body* of the loop is *indented*: indentation is Python's way of " "grouping statements. At the interactive prompt, you have to type a tab or " "space(s) for each indented line. In practice you will prepare more " "complicated input for Python with a text editor; all decent text editors " "have an auto-indent facility. When a compound statement is entered " "interactively, it must be followed by a blank line to indicate completion " "(since the parser cannot guess when you have typed the last line). Note " "that each line within a basic block must be indented by the same amount." msgstr "" "O *corpo* do laço é *indentado*: indentação em Python é a maneira de agrupar " "comandos em blocos. No console interativo padrão você terá que digitar tab " "ou espaços para indentar cada linha. Na prática você vai preparar scripts " "Python mais complicados em um editor de texto; a maioria dos editores de " "texto tem facilidades de indentação automática. Quando um comando composto é " "digitado interativamente, deve ser finalizado por uma linha em branco (já " "que o interpretador não tem como adivinhar qual é a última linha do " "comando). Observe que toda linha de um mesmo bloco de comandos deve ter a " "mesma indentação." #: ../../tutorial/introduction.rst:515 msgid "" "The :func:`print` function writes the value of the argument(s) it is given. " "It differs from just writing the expression you want to write (as we did " "earlier in the calculator examples) in the way it handles multiple " "arguments, floating point quantities, and strings. Strings are printed " "without quotes, and a space is inserted between items, so you can format " "things nicely, like this::" msgstr "" "A função :func:`print` escreve o valor dos argumentos fornecidos. É " "diferente de apenas escrever a expressão no interpretador (como fizemos " "anteriormente nos exemplos da calculadora) pela forma como lida com " "múltiplos argumentos, quantidades de ponto flutuante e strings. As strings " "são impressas sem aspas, e um espaço é inserido entre os itens, assim você " "pode formatar bem o resultado, dessa forma::" #: ../../tutorial/introduction.rst:526 msgid "" "The keyword argument *end* can be used to avoid the newline after the " "output, or end the output with a different string::" msgstr "" "O argumento *end* pode ser usado para evitar uma nova linha após a saída ou " "finalizar a saída com uma string diferente::" #: ../../tutorial/introduction.rst:538 msgid "Footnotes" msgstr "Notas de rodapé" #: ../../tutorial/introduction.rst:539 msgid "" "Since ``**`` has higher precedence than ``-``, ``-3**2`` will be interpreted " "as ``-(3**2)`` and thus result in ``-9``. To avoid this and get ``9``, you " "can use ``(-3)**2``." msgstr "" "Uma vez que ``**`` tem precedência mais alta que ``-``, ``-3**2`` será " "interpretado como ``-(3**2)`` e assim resultará em ``-9``. Para evitar isso " "e obter ``9``, você pode usar ``(-3)**2``." #: ../../tutorial/introduction.rst:543 msgid "" "Unlike other languages, special characters such as ``\\n`` have the same " "meaning with both single (``'...'``) and double (``\"...\"``) quotes. The " "only difference between the two is that within single quotes you don't need " "to escape ``\"`` (but you have to escape ``\\'``) and vice versa." msgstr "" "Ao contrário de outras linguagens, caracteres especiais como ``\\n`` têm o " "mesmo significado com as aspas simples (``'...'``) e duplas (``\"...\"``) . " "A única diferença entre as duas é que, dentro de aspas simples, você não " "precisa escapar o ``\"`` (mas você deve escapar a ``\\'``) e vice-versa."