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