Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
4ecfa455
Commit
4ecfa455
authored
May 16, 2016
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expand abbreviations FIFO and LIFO.
parent
98019e1c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
14 deletions
+21
-14
Doc/library/asyncio-eventloop.rst
Doc/library/asyncio-eventloop.rst
+3
-2
Doc/library/collections.rst
Doc/library/collections.rst
+3
-2
Doc/library/itertools.rst
Doc/library/itertools.rst
+2
-1
Doc/library/multiprocessing.rst
Doc/library/multiprocessing.rst
+3
-2
Doc/library/queue.rst
Doc/library/queue.rst
+7
-4
Doc/library/unittest.rst
Doc/library/unittest.rst
+3
-3
No files found.
Doc/library/asyncio-eventloop.rst
View file @
4ecfa455
...
@@ -101,8 +101,9 @@ keywords to your callback, use :func:`functools.partial`. For example,
...
@@ -101,8 +101,9 @@ keywords to your callback, use :func:`functools.partial`. For example,
called after :meth:`call_soon` returns, when control returns to the event
called after :meth:`call_soon` returns, when control returns to the event
loop.
loop.
This operates as a FIFO queue, callbacks are called in the order in
This operates as a :abbr:`FIFO (first-in, first-out)` queue, callbacks
which they are registered. Each callback will be called exactly once.
are called in the order in which they are registered. Each callback
will be called exactly once.
Any positional arguments after the callback will be passed to the
Any positional arguments after the callback will be passed to the
callback when it is called.
callback when it is called.
...
...
Doc/library/collections.rst
View file @
4ecfa455
...
@@ -987,8 +987,9 @@ the items are returned in the order their keys were first added.
...
@@ -987,8 +987,9 @@ the items are returned in the order their keys were first added.
.. method:: popitem(last=True)
.. method:: popitem(last=True)
The :meth:`popitem` method for ordered dictionaries returns and removes a
The :meth:`popitem` method for ordered dictionaries returns and removes a
(key, value) pair. The pairs are returned in LIFO order if *last* is true
(key, value) pair. The pairs are returned in
or FIFO order if false.
:abbr:`LIFO (last-in, first-out)` order if *last* is true
or :abbr:`FIFO (first-in, first-out)` order if false.
.. method:: move_to_end(key, last=True)
.. method:: move_to_end(key, last=True)
...
...
Doc/library/itertools.rst
View file @
4ecfa455
...
@@ -591,7 +591,8 @@ loops that truncate the stream.
...
@@ -591,7 +591,8 @@ loops that truncate the stream.
Return *n* independent iterators from a single iterable.
Return *n* independent iterators from a single iterable.
The following Python code helps explain what *tee* does (although the actual
The following Python code helps explain what *tee* does (although the actual
implementation is more complex and uses only a single underlying FIFO queue)::
implementation is more complex and uses only a single underlying
:abbr:`FIFO (first-in, first-out)` queue)::
def tee(iterable, n=2):
def tee(iterable, n=2):
it = iter(iterable)
it = iter(iterable)
...
...
Doc/library/multiprocessing.rst
View file @
4ecfa455
...
@@ -644,8 +644,9 @@ primitives like locks.
...
@@ -644,8 +644,9 @@ primitives like locks.
For
passing
messages
one
can
use
:
func
:`
Pipe
`
(
for
a
connection
between
two
For
passing
messages
one
can
use
:
func
:`
Pipe
`
(
for
a
connection
between
two
processes
)
or
a
queue
(
which
allows
multiple
producers
and
consumers
).
processes
)
or
a
queue
(
which
allows
multiple
producers
and
consumers
).
The
:
class
:`
Queue
`,
:
class
:`
SimpleQueue
`
and
:
class
:`
JoinableQueue
`
types
are
multi
-
producer
,
The
:
class
:`
Queue
`,
:
class
:`
SimpleQueue
`
and
:
class
:`
JoinableQueue
`
types
multi
-
consumer
FIFO
queues
modelled
on
the
:
class
:`
queue
.
Queue
`
class
in
the
are
multi
-
producer
,
multi
-
consumer
:
abbr
:`
FIFO
(
first
-
in
,
first
-
out
)`
queues
modelled
on
the
:
class
:`
queue
.
Queue
`
class
in
the
standard
library
.
They
differ
in
that
:
class
:`
Queue
`
lacks
the
standard
library
.
They
differ
in
that
:
class
:`
Queue
`
lacks
the
:
meth
:`~
queue
.
Queue
.
task_done
`
and
:
meth
:`~
queue
.
Queue
.
join
`
methods
introduced
:
meth
:`~
queue
.
Queue
.
task_done
`
and
:
meth
:`~
queue
.
Queue
.
join
`
methods
introduced
into
Python
2.5
's :class:`queue.Queue` class.
into
Python
2.5
's :class:`queue.Queue` class.
...
...
Doc/library/queue.rst
View file @
4ecfa455
...
@@ -16,8 +16,9 @@ availability of thread support in Python; see the :mod:`threading`
...
@@ -16,8 +16,9 @@ availability of thread support in Python; see the :mod:`threading`
module.
module.
The module implements three types of queue, which differ only in the order in
The module implements three types of queue, which differ only in the order in
which the entries are retrieved. In a FIFO queue, the first tasks added are
which the entries are retrieved. In a :abbr:`FIFO (first-in, first-out)`
the first retrieved. In a LIFO queue, the most recently added entry is
queue, the first tasks added are the first retrieved. In a
:abbr:`LIFO (last-in, first-out)` queue, the most recently added entry is
the first retrieved (operating like a stack). With a priority queue,
the first retrieved (operating like a stack). With a priority queue,
the entries are kept sorted (using the :mod:`heapq` module) and the
the entries are kept sorted (using the :mod:`heapq` module) and the
lowest valued entry is retrieved first.
lowest valued entry is retrieved first.
...
@@ -27,14 +28,16 @@ The :mod:`queue` module defines the following classes and exceptions:
...
@@ -27,14 +28,16 @@ The :mod:`queue` module defines the following classes and exceptions:
.. class:: Queue(maxsize=0)
.. class:: Queue(maxsize=0)
Constructor for a FIFO queue. *maxsize* is an integer that sets the upperbound
Constructor for a :abbr:`FIFO (first-in, first-out)` queue. *maxsize* is
an integer that sets the upperbound
limit on the number of items that can be placed in the queue. Insertion will
limit on the number of items that can be placed in the queue. Insertion will
block once this size has been reached, until queue items are consumed. If
block once this size has been reached, until queue items are consumed. If
*maxsize* is less than or equal to zero, the queue size is infinite.
*maxsize* is less than or equal to zero, the queue size is infinite.
.. class:: LifoQueue(maxsize=0)
.. class:: LifoQueue(maxsize=0)
Constructor for a LIFO queue. *maxsize* is an integer that sets the upperbound
Constructor for a :abbr:`LIFO (last-in, first-out)` queue. *maxsize* is
an integer that sets the upperbound
limit on the number of items that can be placed in the queue. Insertion will
limit on the number of items that can be placed in the queue. Insertion will
block once this size has been reached, until queue items are consumed. If
block once this size has been reached, until queue items are consumed. If
*maxsize* is less than or equal to zero, the queue size is infinite.
*maxsize* is less than or equal to zero, the queue size is infinite.
...
...
Doc/library/unittest.rst
View file @
4ecfa455
...
@@ -1388,9 +1388,9 @@ Test cases
...
@@ -1388,9 +1388,9 @@ Test cases
Add a function to be called after :meth:`tearDown` to cleanup resources
Add a function to be called after :meth:`tearDown` to cleanup resources
used during the test. Functions will be called in reverse order to the
used during the test. Functions will be called in reverse order to the
order they are added (
LIFO). They are called with any arguments and
order they are added (
:abbr:`LIFO (last-in, first-out)`). They
keyword arguments passed into :meth:`addCleanup` when they are
are called with any arguments and keyword arguments passed into
added.
:meth:`addCleanup` when they are
added.
If :meth:`setUp` fails, meaning that :meth:`tearDown` is not called,
If :meth:`setUp` fails, meaning that :meth:`tearDown` is not called,
then any cleanup functions added will still be called.
then any cleanup functions added will still be called.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment