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
8f2d0061
Commit
8f2d0061
authored
Feb 06, 2008
by
Mark Summerfield
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a table and a title that were broken.
parent
e4c96ad7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
Doc/library/collections.rst
Doc/library/collections.rst
+14
-12
No files found.
Doc/library/collections.rst
View file @
8f2d0061
...
...
@@ -24,9 +24,9 @@ In addition to containers, the collections module provides some ABCs
a class provides a particular interface, for example, is it hashable or
a mapping. The ABCs provided include those in the following table:
===================================== ========================================
===================================== ========================================
========================================
ABC Notes
===================================== ========================================
===================================== ========================================
========================================
:class:`collections.Container` Defines ``__contains__()``
:class:`collections.Hashable` Defines ``__hash__()``
:class:`collections.Iterable` Defines ``__iter__()``
...
...
@@ -45,23 +45,25 @@ ABC Notes
:class:`collections.Sequence` Derived from :class:`Container`,
:class:`Iterable`, and :class:`Sized`,
and in addition defines
``__getitem__()`
``__getitem__()`
`
:class:`collections.MutableSequence` Derived from :class:`Sequence`
:class:`collections.Set` Derived from :class:`Container`, :class:`Iterable`, :class:`Sized`.
:class:`collections.Set` Derived from :class:`Container`,
:class:`Iterable`, and :class:`Sized`,
add in addition defines
``__le__()``, ``__lt__()``, ``__eq__()``,
``__and__()``, ``__or__()``, ``__sub__()``,
``__le__()``, ``__lt__()``,
``__eq__()``, ``__and__()``,
``__or__()``, ``__sub__()``,
``__xor__()``, and ``isdisjoint()``,
:class:`collections.MutableSet` Derived from :class:`Set` and in
addition defines ``add()``,
``clear()``, ``discard()``, ``pop()``,
``remove()``, ``__ior__()``,
``__iand__()``,
``__i
xor__()``, and ``__isub__()``
===================================== ========================================
``remove()``, ``__ior__()``,
``__i
and__()``, ``__ixor__()``, and
``__isub__()``
===================================== ========================================
========================================
.. XXX Have not included them all and the notes are incomplete
..
Deliberately did one row wide to get a neater outp
ut
..
long = lines improves the layo
ut
These ABCs allow us to ask classes or instances if they provide
particular functionality, for example::
...
...
@@ -588,7 +590,7 @@ customize a prototype instance::
:class:`UserDict` objects
----------------------
----------------------
---
The class, :class:`UserDict` acts as a wrapper around dictionary objects.
The need for this class has been partially supplanted by the ability to
...
...
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