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
6edff59e
Commit
6edff59e
authored
Oct 16, 2007
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add items
parent
abfd8dff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
1 deletion
+50
-1
Doc/whatsnew/2.6.rst
Doc/whatsnew/2.6.rst
+50
-1
No files found.
Doc/whatsnew/2.6.rst
View file @
6edff59e
...
...
@@ -515,6 +515,12 @@ fixes. Here's a partial list of the most notable changes, sorted alphabetically
by module name. Consult the :file:`Misc/NEWS` file in the source tree for a more
complete list of changes, or look through the CVS logs for all the details.
* The :mod:`bsddb.dbshelve` module now uses the highest pickling protocol
available, instead of restricting itself to protocol 1.
(Contributed by W. Barnes.)
.. % Patch 1551443
* A new data type in the :mod:`collections` module: :class:`named_tuple(typename,
fieldnames)` is a factory function that creates subclasses of the standard tuple
whose fields are accessible by name as well as index. For example::
...
...
@@ -531,17 +537,48 @@ complete list of changes, or look through the CVS logs for all the details.
1 1
>>> print var[2], var.type # Equivalent
int int
>>> var.__asdict__()
{'size': 4, 'type': 'int', 'id': 1, 'name': 'frequency'}
>>> v2 = var.__replace__('name', 'amplitude')
>>> v2
variable(id=1, name='amplitude', type='int', size=4)
(Contributed by Raymond Hettinger.)
* Another change to the :mod:`collections` module is that the
:class:`deque` type now supports an optional `maxlen` parameter;
if supplied, the deque's size will be restricted to no more
than ``maxlen`` items. Adding more items to a full deque causes
old items to be discarded.
::
>>> from collections import deque
>>> dq=deque(maxlen=3)
>>> dq
deque([], maxlen=3)
>>> dq.append(1) ; dq.append(2) ; dq.append(3)
>>> dq
deque([1, 2, 3], maxlen=3)
>>> dq.append(4)
>>> dq
deque([2, 3, 4], maxlen=3)
(Contributed by Raymond Hettinger.)
* The :mod:`ctypes` module now supports a :class:`c_bool` datatype
that represents the C99 ``bool`` type. (Contributed by David Remahl.)
.. % Patch 1649190
The :mod:`ctypes` string, buffer and array types also have improved
support for extended slicing syntax,
where various combinations of ``(start, stop, step)`` are supplied.
(Implemented by Thomas Wouters.)
.. % Revision 57769
* A new method in the :mod:`curses` module: for a window, :meth:`chgat` changes
the display characters for a certain number of characters on a single line.
::
...
...
@@ -626,6 +663,12 @@ complete list of changes, or look through the CVS logs for all the details.
.. % Patch 1273829
* The ``os.environ`` object's :meth:`clear` method will now unset the
environment variables using :func:`os.unsetenv` in addition to clearing
the object's keys. (Contributed by XXX.)
.. % Patch #1181
* In the :mod:`os.path` module, the :func:`splitext` function
has been changed to not split on leading period characters.
This produces better results when operating on Unix's dot-files.
...
...
@@ -799,7 +842,13 @@ Build and C API Changes
Changes to Python's build process and to the C API include:
* Detailed changes will be listed here.
* The BerkeleyDB module now has a C API object, available as
``bsddb.db.api``. This object can be used by other C extensions
that wish to use the :mod:`bsddb` module for their own purposes.
(Contributed by Duncan Grisby.)
.. % Patch 1551895
.. % ======================================================================
...
...
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