Original Translation
31
A series of statements which returns some value to a caller. It can also be passed zero or more arguments which may be used in the execution of the body. See also :term:`argument` and :term:`method`.
32
A pseudo module which programmers can use to enable new language features which are not compatible with the current interpreter.
33
By importing the :mod:`__future__` module and evaluating its variables, you can see when a new feature was first added to the language and when it becomes the default::
34
>>> import __future__ >>> __future__.division _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)
35
The process of freeing memory when it is not used anymore. Python performs garbage collection via reference counting and a cyclic garbage collector that is able to detect and break reference cycles.
36
A function which returns an iterator. It looks like a normal function except that values are returned to the caller using a :keyword:`yield` statement instead of a :keyword:`return` statement. Generator functions often contain one or more :keyword:`for` or :keyword:`while` loops which :keyword:`yield` elements back to the caller. The function execution is stopped at the :keyword:`yield` keyword (returning the result) and is resumed there when the next element is requested by calling the :meth:`__next__` method of the returned iterator.
Suggestion 0 by nobody:
You're right, I should have pnoetid out my comment was more directed at what you were talking about, namely concurrent access to atomic operations such as dict.keys(). I've found that yes while certain actions are atomic within Python, it's much safer to build a system where you do not rely on the atom-icity of those actions when sharing amongst threads. The point of the GIL is *not* to be an end-user language feature, the point is to make it easy to maintain C extensions and the interpreter itself, relying on the GIL makes your code brittle, and won't run on any other interpreter that lacks that GIL-safety net. It's just a bad idea.
Suggestion 1 by nobody:
cWy8Jn <a href="http://fbtoogmbtxfx.com/">fbtoogmbtxfx</a>
Suggestion 2 by nobody:
zaRzJO , [url=http://frjhpcsnrasx.com/]frjhpcsnrasx[/url], [link=http://rvdoabtsvtsq.com/]rvdoabtsvtsq[/link], http://datajyhgxjop.com/
Suggestion 3 by nobody:
mf674e <a href="http://qupuivbwyenz.com/">qupuivbwyenz</a>
Suggestion 4 by nobody:
D65Ulb , [url=http://gxcrhyspvvar.com/]gxcrhyspvvar[/url], [link=http://edikclomocfp.com/]edikclomocfp[/link], http://pljphwirocwh.com/
37
An expression that returns an iterator. It looks like a normal expression followed by a :keyword:`for` expression defining a loop variable, range, and an optional :keyword:`if` expression. The combined expression generates values for an enclosing function::
38
>>> sum(i*i for i in range(10)) # sum of squares 0, 1, 4, ... 81 285
39
See :term:`global interpreter lock`.
40
The lock used by Python threads to assure that only one thread executes in the :term:`CPython` :term:`virtual machine` at a time. This simplifies the CPython implementation by assuring that no two processes can access the same memory at the same time. Locking the entire interpreter makes it easier for the interpreter to be multi-threaded, at the expense of much of the parallelism afforded by multi-processor machines. Efforts have been made in the past to create a "free-threaded" interpreter (one which locks shared data at a much finer granularity), but so far none have been successful because performance suffered in the common single-processor case.