File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,10 @@ msgid ""
122
122
"of the rules, and a dissection of the implementation, can be found in the "
123
123
"PEP."
124
124
msgstr ""
125
+ "Python 2.1 最显著的改变是增加了静态作用域这一语言特征来解决此问题。 作为它的第一项影响,在上述示例中的 ``name=name`` "
126
+ "默认参数现在将不再必要。 简单地说,当一个函数内部的给定变量名没有被赋值时(通过赋值语句,或者 :keyword:`def`, "
127
+ ":keyword:`class` 或 :keyword:`import` 语句),对该变量的引用将在外层作用域的局部命名空间中查找。 "
128
+ "对于该规则的更详细解释,以及具体实现的分析,请参阅相应的 PEP。"
125
129
126
130
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/whatsnew/2.1.rst:77
127
131
msgid ""
@@ -131,6 +135,8 @@ msgid ""
131
135
"rather unlikely though, since such code would have been pretty confusing to "
132
136
"read in the first place."
133
137
msgstr ""
138
+ "对于同时在模块层级和包含下层函数定义的函数内部局部变量使用了相同变量名的代码来说这项改变可能会导致一些兼容性问题。 "
139
+ "不过这看来不太可能发生,因为阅读这样的代码本来就会相当令人困惑。"
134
140
135
141
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/whatsnew/2.1.rst:83
136
142
msgid ""
Original file line number Diff line number Diff line change @@ -1029,6 +1029,8 @@ msgid ""
1029
1029
"rather unlikely though, since such code would have been pretty confusing to "
1030
1030
"read in the first place."
1031
1031
msgstr ""
1032
+ "对于同时在模块层级和包含下层函数定义的函数内部局部变量使用了相同变量名的代码来说这项改变可能会导致一些兼容性问题。 "
1033
+ "不过这看来不太可能发生,因为阅读这样的代码本来就会相当令人困惑。"
1032
1034
1033
1035
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/whatsnew/2.2.rst:894
1034
1036
msgid ""
You can’t perform that action at this time.
0 commit comments