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