@@ -3049,7 +3049,7 @@ msgstr ""
3049
3049
3050
3050
#: ../../faq/programming.rst:2116
3051
3051
msgid "How can I have modules that mutually import each other?"
3052
- msgstr ""
3052
+ msgstr "Como posso ter módulos que se importam mutuamente? "
3053
3053
3054
3054
#: ../../faq/programming.rst:2118
3055
3055
msgid "Suppose you have the following modules:"
@@ -3069,55 +3069,64 @@ msgstr "O problema é que o interpretador vai realizar os seguintes passos:"
3069
3069
3070
3070
#: ../../faq/programming.rst:2132
3071
3071
msgid "main imports ``foo``"
3072
- msgstr ""
3072
+ msgstr "programa principal importa ``foo`` "
3073
3073
3074
3074
#: ../../faq/programming.rst:2133
3075
3075
msgid "Empty globals for ``foo`` are created"
3076
- msgstr ""
3076
+ msgstr "São criados globais vazios para ``foo`` "
3077
3077
3078
3078
#: ../../faq/programming.rst:2134
3079
3079
msgid "``foo`` is compiled and starts executing"
3080
- msgstr ""
3080
+ msgstr "``foo`` é compilado e começa a ser executado "
3081
3081
3082
3082
#: ../../faq/programming.rst:2135
3083
3083
msgid "``foo`` imports ``bar``"
3084
- msgstr ""
3084
+ msgstr "``foo`` importa ``bar`` "
3085
3085
3086
3086
#: ../../faq/programming.rst:2136
3087
3087
msgid "Empty globals for ``bar`` are created"
3088
- msgstr ""
3088
+ msgstr "São criados globais vazios para ``bar`` "
3089
3089
3090
3090
#: ../../faq/programming.rst:2137
3091
3091
msgid "``bar`` is compiled and starts executing"
3092
- msgstr ""
3092
+ msgstr "``bar`` é compilado e começa a ser executado "
3093
3093
3094
3094
#: ../../faq/programming.rst:2138
3095
3095
msgid ""
3096
3096
"``bar`` imports ``foo`` (which is a no-op since there already is a module "
3097
3097
"named ``foo``)"
3098
3098
msgstr ""
3099
+ "``bar`` importa ``foo`` (o que não é executado de fato, pois já existe um "
3100
+ "módulo chamado ``foo``)"
3099
3101
3100
3102
#: ../../faq/programming.rst:2139
3101
3103
msgid ""
3102
3104
"The import mechanism tries to read ``foo_var`` from ``foo`` globals, to set "
3103
3105
"``bar.foo_var = foo.foo_var``"
3104
3106
msgstr ""
3107
+ "O mecanismo de importação tenta ler ``foo_var`` do ``foo`` em globais, para "
3108
+ "definir ``bar.foo_var = foo.foo_var``"
3105
3109
3106
3110
#: ../../faq/programming.rst:2141
3107
3111
msgid ""
3108
3112
"The last step fails, because Python isn't done with interpreting ``foo`` yet "
3109
3113
"and the global symbol dictionary for ``foo`` is still empty."
3110
3114
msgstr ""
3115
+ "A última etapa falha, pois Python ainda não terminou de interpretar ``foo`` "
3116
+ "e o dicionário de símbolos global para ``foo`` ainda está vazio."
3111
3117
3112
3118
#: ../../faq/programming.rst:2144
3113
3119
msgid ""
3114
3120
"The same thing happens when you use ``import foo``, and then try to access "
3115
3121
"``foo.foo_var`` in global code."
3116
3122
msgstr ""
3123
+ "O mesmo acontece quando você usa ``import foo`` e, em seguida, tenta acessar "
3124
+ "``foo.foo_var`` no código global."
3117
3125
3118
3126
#: ../../faq/programming.rst:2147
3119
3127
msgid "There are (at least) three possible workarounds for this problem."
3120
3128
msgstr ""
3129
+ "Há (pelo menos) três possíveis soluções alternativas para esse problema."
3121
3130
3122
3131
#: ../../faq/programming.rst:2149
3123
3132
msgid ""
@@ -3127,21 +3136,29 @@ msgid ""
3127
3136
"only. This means everything from an imported module is referenced as "
3128
3137
"``<module>.<name>``."
3129
3138
msgstr ""
3139
+ "Guido van Rossum recomenda evitar todos os usos de ``from <module> import ..."
3140
+ "`` e colocar todo o código dentro de funções. As inicializações de "
3141
+ "variáveis globais e variáveis de classe devem usar apenas constantes ou "
3142
+ "funções embutidas. Isso significa que tudo de um módulo importado é "
3143
+ "referenciado como ``<module>.<name>``."
3130
3144
3131
3145
#: ../../faq/programming.rst:2154
3132
3146
msgid ""
3133
3147
"Jim Roskind suggests performing steps in the following order in each module:"
3134
3148
msgstr ""
3149
+ "Jim Roskind sugere a execução das etapas na seguinte ordem em cada módulo:"
3135
3150
3136
3151
#: ../../faq/programming.rst:2156
3137
3152
msgid ""
3138
3153
"exports (globals, functions, and classes that don't need imported base "
3139
3154
"classes)"
3140
3155
msgstr ""
3156
+ "exportações (globais, função e classes que não precisam de classes base "
3157
+ "importadas)"
3141
3158
3142
3159
#: ../../faq/programming.rst:2158
3143
3160
msgid "``import`` statements"
3144
- msgstr "Declaração ``import``"
3161
+ msgstr "instruções ``import``"
3145
3162
3146
3163
#: ../../faq/programming.rst:2159
3147
3164
msgid ""
@@ -3154,16 +3171,20 @@ msgid ""
3154
3171
"Van Rossum doesn't like this approach much because the imports appear in a "
3155
3172
"strange place, but it does work."
3156
3173
msgstr ""
3174
+ "Van Rossum não gosta muito dessa abordagem porque a importação aparece em um "
3175
+ "lugar estranho, mas ela funciona."
3157
3176
3158
3177
#: ../../faq/programming.rst:2164
3159
3178
msgid ""
3160
3179
"Matthias Urlichs recommends restructuring your code so that the recursive "
3161
3180
"import is not necessary in the first place."
3162
3181
msgstr ""
3182
+ "Matthias Urlichs recomenda reestruturar seu código para que importação "
3183
+ "recursiva não seja necessária em primeiro lugar."
3163
3184
3164
3185
#: ../../faq/programming.rst:2167
3165
3186
msgid "These solutions are not mutually exclusive."
3166
- msgstr "Essas soluções não são mutualmente exclusivas."
3187
+ msgstr "Essas soluções não são mutuamente exclusivas."
3167
3188
3168
3189
#: ../../faq/programming.rst:2171
3169
3190
msgid "__import__('x.y.z') returns <module 'x'>; how do I get z?"
0 commit comments