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
d56b5f84
Commit
d56b5f84
authored
Dec 05, 2010
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimization notes.
parent
21f93aa3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
5 deletions
+22
-5
Doc/whatsnew/3.2.rst
Doc/whatsnew/3.2.rst
+22
-5
No files found.
Doc/whatsnew/3.2.rst
View file @
d56b5f84
...
...
@@ -348,6 +348,11 @@ Some smaller changes made to the core Python language are:
the context manager protocol. This allows timely release of any resources
that were acquired when requesting a buffer from the original object.
>>> with memoryview(b'abcdefgh') as v:
... print(v.tolist())
...
[97, 98, 99, 100, 101, 102, 103, 104]
(Added by Antoine Pitrou; :issue:`9757`.)
* Mark Dickinson crafted an elegant and efficient scheme for assuring that
...
...
@@ -389,13 +394,11 @@ Some smaller changes made to the core Python language are:
can be enabled through the means provided by the :mod:`warnings`
module, or on the command line.
:exc:`ResourceWarning` is issued at interpreter shutdown if the
A
:exc:`ResourceWarning` is issued at interpreter shutdown if the
:data:`gc.garbage` list isn't empty. This is meant to make the programmer
aware that their code contains object finalization issues.
(Added by Antoine Pitrou and Georg Brandl; :issue:`477863`.)
:exc:`ResourceWarning` is also issued when a :term:`file object` is destroyed
A :exc:`ResourceWarning` is also issued when a :term:`file object` is destroyed
without having been explicitly closed. While the deallocator for such
object ensures it closes the underlying operating system resource
(usually, a file descriptor), the delay in deallocating the object could
...
...
@@ -411,7 +414,7 @@ Some smaller changes made to the core Python language are:
__main__:1: ResourceWarning: unclosed file <_io.BufferedWriter name='foo'>
>>>
(Added by Antoine Pitrou
, :issue:`1009
3`.)
(Added by Antoine Pitrou
and Georg Brandl in :issue:`10093` and :issue:`47786
3`.)
* :class:`range` objects now support and *index* and *count* methods. This is
part of an effort to make more objects fully implement the :class:`collections.Sequence`
...
...
@@ -424,6 +427,11 @@ Some smaller changes made to the core Python language are:
(Contributed by Daniel Stuzback in :issue:`9213` and by Alexander Belopolsky
in :issue:`2690`.)
* The :func:`callable` builtin function from Py2.x was resurrected. It provides
a concise, readable alternative to using an :term:`abstract base class` to in
an expression like ``isinstance(x, collections.Callable)``.
(See :issue:`10518`.)
New, Improved, and Deprecated Modules
=====================================
...
...
@@ -802,6 +810,15 @@ A number of small performance enhancements have been added:
(Patch by Florent Xicluna in :issue:`7622` and :issue:`7462`.)
There were several other minor optimizations. Set differencing now runs faster
when one operand is much larger than the other (Patch by Andress Bennetts in
:issue:`8685`). The :meth:`array.repeat` method has a faster implementation
(:issue:`1569291` by Alexander Belopolsky). The :class:`BaseHTTPRequestHandler`
has more efficient buffering (:issue:`3709` by Andrew Schaaf). The
multi-argument form of :func:`operator.attrgetter` now function runs slightly
faster (:issue:`10160` by Christos Georgiou). And :class:`ConfigParser` loads
multi-line arguments a bit faster (:issue:`7113` by Łukasz Langa).
Unicode
=======
...
...
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