@@ -8,10 +8,11 @@ msgid ""
8
8
msgstr ""
9
9
"Project-Id-Version : Python 3.7\n "
10
10
"Report-Msgid-Bugs-To : \n "
11
- "POT-Creation-Date : 2018-06-26 18:54 +0800\n "
11
+ "POT-Creation-Date : 2018-07-01 16:27 +0800\n "
12
12
"PO-Revision-Date : YEAR-MO-DA HO:MI+ZONE\n "
13
13
"Last-Translator : FULL NAME <EMAIL@ADDRESS>\n "
14
14
"Language-Team : LANGUAGE <LL@li.org>\n "
15
+ "Language : \n "
15
16
"MIME-Version : 1.0\n "
16
17
"Content-Type : text/plain; charset=UTF-8\n "
17
18
"Content-Transfer-Encoding : 8bit\n "
@@ -72,183 +73,183 @@ msgstr ""
72
73
msgid "The name of the variable. This is a read-only property."
73
74
msgstr ""
74
75
75
- #: ../../library/contextvars.rst:53
76
+ #: ../../library/contextvars.rst:55
76
77
msgid "Return a value for the context variable for the current context."
77
78
msgstr ""
78
79
79
- #: ../../library/contextvars.rst:55
80
+ #: ../../library/contextvars.rst:57
80
81
msgid ""
81
82
"If there is no value for the variable in the current context, the method "
82
83
"will:"
83
84
msgstr ""
84
85
85
- #: ../../library/contextvars.rst:58
86
+ #: ../../library/contextvars.rst:60
86
87
msgid ""
87
88
"return the value of the *default* argument of the method, if provided; or"
88
89
msgstr ""
89
90
90
- #: ../../library/contextvars.rst:61
91
+ #: ../../library/contextvars.rst:63
91
92
msgid ""
92
93
"return the default value for the context variable, if it was created with "
93
94
"one; or"
94
95
msgstr ""
95
96
96
- #: ../../library/contextvars.rst:64
97
+ #: ../../library/contextvars.rst:66
97
98
msgid "raise a :exc:`LookupError`."
98
99
msgstr ""
99
100
100
- #: ../../library/contextvars.rst:68
101
+ #: ../../library/contextvars.rst:70
101
102
msgid ""
102
103
"Call to set a new value for the context variable in the current context."
103
104
msgstr ""
104
105
105
- #: ../../library/contextvars.rst:71
106
+ #: ../../library/contextvars.rst:73
106
107
msgid ""
107
108
"The required *value* argument is the new value for the context variable."
108
109
msgstr ""
109
110
110
- #: ../../library/contextvars.rst:74
111
+ #: ../../library/contextvars.rst:76
111
112
msgid ""
112
113
"Returns a :class:`~contextvars.Token` object that can be used to restore the "
113
114
"variable to its previous value via the :meth:`ContextVar.reset` method."
114
115
msgstr ""
115
116
116
- #: ../../library/contextvars.rst:80
117
+ #: ../../library/contextvars.rst:82
117
118
msgid ""
118
119
"Reset the context variable to the value it had before the :meth:`ContextVar."
119
120
"set` that created the *token* was used."
120
121
msgstr ""
121
122
122
- #: ../../library/contextvars.rst:83
123
+ #: ../../library/contextvars.rst:85
123
124
msgid "For example::"
124
125
msgstr ""
125
126
126
- #: ../../library/contextvars.rst:97
127
+ #: ../../library/contextvars.rst:99
127
128
msgid ""
128
129
"*Token* objects are returned by the :meth:`ContextVar.set` method. They can "
129
130
"be passed to the :meth:`ContextVar.reset` method to revert the value of the "
130
131
"variable to what it was before the corresponding *set*."
131
132
msgstr ""
132
133
133
- #: ../../library/contextvars.rst:104
134
+ #: ../../library/contextvars.rst:106
134
135
msgid ""
135
136
"A read-only property. Points to the :class:`ContextVar` object that created "
136
137
"the token."
137
138
msgstr ""
138
139
139
- #: ../../library/contextvars.rst:109
140
+ #: ../../library/contextvars.rst:111
140
141
msgid ""
141
142
"A read-only property. Set to the value the variable had before the :meth:"
142
143
"`ContextVar.set` method call that created the token. It points to :attr:"
143
144
"`Token.MISSING` is the variable was not set before the call."
144
145
msgstr ""
145
146
146
- #: ../../library/contextvars.rst:116
147
+ #: ../../library/contextvars.rst:118
147
148
msgid "A marker object used by :attr:`Token.old_value`."
148
149
msgstr ""
149
150
150
- #: ../../library/contextvars.rst:120
151
+ #: ../../library/contextvars.rst:122
151
152
msgid "Manual Context Management"
152
153
msgstr ""
153
154
154
- #: ../../library/contextvars.rst:124
155
+ #: ../../library/contextvars.rst:126
155
156
msgid "Returns a copy of the current :class:`~contextvars.Context` object."
156
157
msgstr ""
157
158
158
- #: ../../library/contextvars.rst:126
159
+ #: ../../library/contextvars.rst:128
159
160
msgid ""
160
161
"The following snippet gets a copy of the current context and prints all "
161
162
"variables and their values that are set in it::"
162
163
msgstr ""
163
164
164
- #: ../../library/contextvars.rst:132
165
+ #: ../../library/contextvars.rst:134
165
166
msgid ""
166
167
"The function has an O(1) complexity, i.e. works equally fast for contexts "
167
168
"with a few context variables and for contexts that have a lot of them."
168
169
msgstr ""
169
170
170
- #: ../../library/contextvars.rst:139
171
+ #: ../../library/contextvars.rst:141
171
172
msgid "A mapping of :class:`ContextVars <ContextVar>` to their values."
172
173
msgstr ""
173
174
174
- #: ../../library/contextvars.rst:141
175
+ #: ../../library/contextvars.rst:143
175
176
msgid ""
176
177
"``Context()`` creates an empty context with no values in it. To get a copy "
177
178
"of the current context use the :func:`~contextvars.copy_context` function."
178
179
msgstr ""
179
180
180
- #: ../../library/contextvars.rst:145
181
+ #: ../../library/contextvars.rst:147
181
182
msgid "Context implements the :class:`collections.abc.Mapping` interface."
182
183
msgstr ""
183
184
184
- #: ../../library/contextvars.rst:149
185
+ #: ../../library/contextvars.rst:151
185
186
msgid ""
186
187
"Execute ``callable(*args, **kwargs)`` code in the context object the *run* "
187
188
"method is called on. Return the result of the execution or propagate an "
188
189
"exception if one occurred."
189
190
msgstr ""
190
191
191
- #: ../../library/contextvars.rst:153
192
+ #: ../../library/contextvars.rst:155
192
193
msgid ""
193
194
"Any changes to any context variables that *callable* makes will be contained "
194
195
"in the context object::"
195
196
msgstr ""
196
197
197
- #: ../../library/contextvars.rst:182
198
+ #: ../../library/contextvars.rst:184
198
199
msgid ""
199
200
"The method raises a :exc:`RuntimeError` when called on the same context "
200
201
"object from more than one OS thread, or when called recursively."
201
202
msgstr ""
202
203
203
- #: ../../library/contextvars.rst:188
204
+ #: ../../library/contextvars.rst:190
204
205
msgid "Return a shallow copy of the context object."
205
206
msgstr ""
206
207
207
- #: ../../library/contextvars.rst:192
208
+ #: ../../library/contextvars.rst:194
208
209
msgid ""
209
210
"Return ``True`` if the *context* has a value for *var* set; return ``False`` "
210
211
"otherwise."
211
212
msgstr ""
212
213
213
- #: ../../library/contextvars.rst:197
214
+ #: ../../library/contextvars.rst:199
214
215
msgid ""
215
216
"Return the value of the *var* :class:`ContextVar` variable. If the variable "
216
217
"is not set in the context object, a :exc:`KeyError` is raised."
217
218
msgstr ""
218
219
219
- #: ../../library/contextvars.rst:203
220
+ #: ../../library/contextvars.rst:205
220
221
msgid ""
221
222
"Return the value for *var* if *var* has the value in the context object. "
222
223
"Return *default* otherwise. If *default* is not given, return ``None``."
223
224
msgstr ""
224
225
225
- #: ../../library/contextvars.rst:209
226
+ #: ../../library/contextvars.rst:211
226
227
msgid "Return an iterator over the variables stored in the context object."
227
228
msgstr ""
228
229
229
- #: ../../library/contextvars.rst:214
230
+ #: ../../library/contextvars.rst:216
230
231
msgid "Return the number of variables set in the context object."
231
232
msgstr ""
232
233
233
- #: ../../library/contextvars.rst:218
234
+ #: ../../library/contextvars.rst:220
234
235
msgid "Return a list of all variables in the context object."
235
236
msgstr ""
236
237
237
- #: ../../library/contextvars.rst:222
238
+ #: ../../library/contextvars.rst:224
238
239
msgid "Return a list of all variables' values in the context object."
239
240
msgstr ""
240
241
241
- #: ../../library/contextvars.rst:227
242
+ #: ../../library/contextvars.rst:229
242
243
msgid ""
243
244
"Return a list of 2-tuples containing all variables and their values in the "
244
245
"context object."
245
246
msgstr ""
246
247
247
- #: ../../library/contextvars.rst:232
248
+ #: ../../library/contextvars.rst:234
248
249
msgid "asyncio support"
249
250
msgstr ""
250
251
251
- #: ../../library/contextvars.rst:234
252
+ #: ../../library/contextvars.rst:236
252
253
msgid ""
253
254
"Context variables are natively supported in :mod:`asyncio` and are ready to "
254
255
"be used without any extra configuration. For example, here is a simple echo "
0 commit comments