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