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
035272be
Commit
035272be
authored
Apr 24, 2003
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some more items
parent
c11076e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
Doc/whatsnew/whatsnew23.tex
Doc/whatsnew/whatsnew23.tex
+18
-3
No files found.
Doc/whatsnew/whatsnew23.tex
View file @
035272be
...
...
@@ -1085,11 +1085,17 @@ unlikely to cause problems in practice.
\item
Built-in types now support the extended slicing syntax,
as described in section~
\ref
{
section-slices
}
of this document.
\item
A new built-in function,
\function
{
sum(
\var
{
iterable
}
,
\var
{
start
}
=0)
}
,
adds up the numeric items in the iterable object and returns their sum.
\function
{
sum()
}
only accepts numbers, meaning that you can't use it
to concatenate a bunch of strings, for example. (Contributed by Alex
Martelli.)
\item
Dictionaries have a new method,
\method
{
pop(
\var
{
key
}
\optional
{
,
\var
{
default
}}
)
}
, that returns the value corresponding to
\var
{
key
}
and removes that key/value pair from the dictionary. If the requested
key isn't present in the dictionary,
\var
{
default
}
is returned if
it's
specified and
\exception
{
KeyError
}
raised if it isn't.
key isn't present in the dictionary,
\var
{
default
}
is returned if
it's
specified and
\exception
{
KeyError
}
raised if it isn't.
\begin{verbatim}
>>> d =
{
1:2
}
...
...
@@ -1397,6 +1403,9 @@ it now checks for the \envvar{CC}, \envvar{CFLAGS}, \envvar{CPP},
them to override the settings in Python's configuration (contributed
by Robert Weber).
\item
The new
\function
{
gc.get
_
referents(
\var
{
object
}
)
}
function returns a
list of all the objects referenced by
\var
{
object
}
.
\item
The
\module
{
getopt
}
module gained a new function,
\function
{
gnu
_
getopt()
}
, that supports the same arguments as the existing
\function
{
getopt()
}
function but uses GNU-style scanning mode.
...
...
@@ -1524,6 +1533,12 @@ used on platforms other than Linux, and the interface has also been
tidied and brought up to date in various ways. (Contributed by Greg
Ward and Nicholas FitzRoy-Dale.)
\item
The new
\module
{
platform
}
module contains a number of functions
that try to determine various properties of the platform you're
running on. There are functions for getting the architecture, CPU
type, the Windows OS version, and even the Linux distribution version.
(Contributed by Marc-Andr
\'
e Lemburg.)
\item
The parser objects provided by the
\module
{
pyexpat
}
module
can now optionally buffer character data, resulting in fewer calls to
your character data handler and therefore faster performance. Setting
...
...
@@ -1576,7 +1591,7 @@ use something else.
(Sticking with Python 2.2 or 2.1 will not make your applications any
safer because there are known bugs in the
\module
{
rexec
}
module in
those versions.
I repeat,
if you're using
\module
{
rexec
}
, stop using
those versions.
To repeat:
if you're using
\module
{
rexec
}
, stop using
it immediately.)
\item
The
\module
{
rotor
}
module has been deprecated because the
...
...
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