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
4cbd4ce0
Commit
4cbd4ce0
authored
Jan 18, 2011
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add example for the abc module.
parent
be63320f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
Doc/whatsnew/3.2.rst
Doc/whatsnew/3.2.rst
+13
-5
No files found.
Doc/whatsnew/3.2.rst
View file @
4cbd4ce0
...
...
@@ -815,9 +815,9 @@ collections
(Contributed by Raymond Hettinger.)
* The :class:`collections.deque`
grew two new methods :meth:`~collections.deque.count`
and :meth:`collections.deque.reverse` that make them more substitutable for
:class:`list` when needed
:
* The :class:`collections.deque`
class grew two new methods
:meth:`~collections.deque.count` and :meth:`~collections.deque.reverse` that
make them more substitutable for :class:`list` objects
:
>>> d = deque('simsalabim')
>>> d.count('s')
...
...
@@ -914,9 +914,17 @@ abc
The :mod:`abc` module now supports :func:`~abc.abstractclassmethod` and
:func:`~abc.abstractstaticmethod`.
These tools make it possible to define an :term:`
Abstract Base C
lass` that
These tools make it possible to define an :term:`
abstract base c
lass` that
requires a particular :func:`classmethod` or :func:`staticmethod` to be
implemented.
implemented::
class Temperature(metaclass=ABCMeta):
@abc.abstractclassmethod
def from_farenheit(self, t):
...
@abc.abstractclassmethod
def from_celsium(self, t):
...
(Patch submitted by Daniel Urban; :issue:`5867`.)
...
...
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