@@ -25,7 +25,7 @@ msgstr ""
25
25
26
26
#: ../../library/typing.rst:2
27
27
msgid ":mod:`typing` --- Support for type hints"
28
- msgstr ""
28
+ msgstr ":mod:`typing` --- Suporte para dicas de tipo "
29
29
30
30
#: ../../library/typing.rst:9
31
31
msgid "**Source code:** :source:`Lib/typing.py`"
@@ -37,6 +37,9 @@ msgid ""
37
37
"They can be used by third party tools such as type checkers, IDEs, linters, "
38
38
"etc."
39
39
msgstr ""
40
+ "O tempo de execução do Python não força anotações de tipos de variáveis e "
41
+ "funções. Elas podem ser usadas por ferramentas de terceiros como "
42
+ "verificadores de tipo, IDEs, linters, etc."
40
43
41
44
#: ../../library/typing.rst:19
42
45
msgid ""
@@ -52,17 +55,21 @@ msgstr ""
52
55
msgid ""
53
56
"The function below takes and returns a string and is annotated as follows::"
54
57
msgstr ""
58
+ "A função abaixo recebe e retorna uma string e é anotada como a seguir::"
55
59
56
60
#: ../../library/typing.rst:32
57
61
msgid ""
58
62
"In the function ``greeting``, the argument ``name`` is expected to be of "
59
63
"type :class:`str` and the return type :class:`str`. Subtypes are accepted as "
60
64
"arguments."
61
65
msgstr ""
66
+ "Na função ``greeting``, é esperado que o argumento ``name`` seja do tipo :"
67
+ "class:`str` e o retorno do tipo :class:`str`. Subtipos são aceitos como "
68
+ "argumentos."
62
69
63
70
#: ../../library/typing.rst:37
64
71
msgid "Type aliases"
65
- msgstr ""
72
+ msgstr "Apelidos de tipo "
66
73
67
74
#: ../../library/typing.rst:39
68
75
msgid ""
@@ -75,16 +82,20 @@ msgid ""
75
82
"Type aliases are useful for simplifying complex type signatures. For "
76
83
"example::"
77
84
msgstr ""
85
+ "Apelidos de tipo são úteis para simplificar assinaturas de tipo complexas. "
86
+ "Por exemplo::"
78
87
79
88
#: ../../library/typing.rst:69
80
89
msgid ""
81
90
"Note that ``None`` as a type hint is a special case and is replaced by "
82
91
"``type(None)``."
83
92
msgstr ""
93
+ "Note que ``None`` como uma dica de tipo é um caso especial e é substituído "
94
+ "por ``type(None)``."
84
95
85
96
#: ../../library/typing.rst:75
86
97
msgid "NewType"
87
- msgstr ""
98
+ msgstr "NewType "
88
99
89
100
#: ../../library/typing.rst:77
90
101
msgid "Use the :func:`NewType` helper function to create distinct types::"
@@ -95,6 +106,9 @@ msgid ""
95
106
"The static type checker will treat the new type as if it were a subclass of "
96
107
"the original type. This is useful in helping catch logical errors::"
97
108
msgstr ""
109
+ "O verificador de tipo estático tratará o novo tipo como se fosse uma "
110
+ "subclasse do tipo original. Isso é útil para ajudar a encontrar erros de "
111
+ "lógica::"
98
112
99
113
#: ../../library/typing.rst:96
100
114
msgid ""
@@ -103,6 +117,11 @@ msgid ""
103
117
"pass in a ``UserId`` wherever an ``int`` might be expected, but will prevent "
104
118
"you from accidentally creating a ``UserId`` in an invalid way::"
105
119
msgstr ""
120
+ "Você ainda pode executar todas as operações ``int`` em uma variável do tipo "
121
+ "``UserId``, mas o resultado sempre será do tipo ``int``. Isso permite que "
122
+ "você passe um ``UserId`` em qualquer ocasião que ``int`` possa ser esperado, "
123
+ "mas previne que você acidentalmente crie um ``UserId`` de uma forma "
124
+ "inválida::"
106
125
107
126
#: ../../library/typing.rst:104
108
127
msgid ""
0 commit comments