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
e69747c6
Commit
e69747c6
authored
Jan 22, 2007
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update version of What's New
parent
bb6a0edc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
17 deletions
+27
-17
Doc/whatsnew/whatsnew25.tex
Doc/whatsnew/whatsnew25.tex
+27
-17
No files found.
Doc/whatsnew/whatsnew25.tex
View file @
e69747c6
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
% Fix XXX comments
% Fix XXX comments
\title
{
What's New in Python 2.5
}
\title
{
What's New in Python 2.5
}
\release
{
1.0
}
\release
{
1.0
1
}
\author
{
A.M. Kuchling
}
\author
{
A.M. Kuchling
}
\authoraddress
{
\email
{
amk@amk.ca
}}
\authoraddress
{
\email
{
amk@amk.ca
}}
...
@@ -409,7 +409,7 @@ is always executed, or one or more \keyword{except} blocks to catch
...
@@ -409,7 +409,7 @@ is always executed, or one or more \keyword{except} blocks to catch
specific exceptions. You couldn't combine both
\keyword
{
except
}
blocks and a
specific exceptions. You couldn't combine both
\keyword
{
except
}
blocks and a
\keyword
{
finally
}
block, because generating the right bytecode for the
\keyword
{
finally
}
block, because generating the right bytecode for the
combined version was complicated and it wasn't clear what the
combined version was complicated and it wasn't clear what the
semantics of the combined should be.
semantics of the combined s
tatement s
hould be.
Guido van~Rossum spent some time working with Java, which does support the
Guido van~Rossum spent some time working with Java, which does support the
equivalent of combining
\keyword
{
except
}
blocks and a
equivalent of combining
\keyword
{
except
}
blocks and a
...
@@ -556,13 +556,14 @@ generators:
...
@@ -556,13 +556,14 @@ generators:
where the generator's execution is paused.
where the generator's execution is paused.
\item
\method
{
close()
}
raises a new
\exception
{
GeneratorExit
}
\item
\method
{
close()
}
raises a new
\exception
{
GeneratorExit
}
exception inside the generator to terminate the iteration.
exception inside the generator to terminate the iteration. On
On receiving this
receiving this exception, the generator's code must either raise
exception, the generator's code must either raise
\exception
{
GeneratorExit
}
or
\exception
{
StopIteration
}
. Catching
\exception
{
GeneratorExit
}
or
\exception
{
StopIteration
}
; catching the
the
\exception
{
GeneratorExit
}
exception and returning a value is
exception and doing anything else is illegal and will trigger
illegal and will trigger a
\exception
{
RuntimeError
}
; if the function
a
\exception
{
RuntimeError
}
.
\method
{
close()
}
will also be called by
raises some other exception, that exception is propagated to the
Python's garbage collector when the generator is garbage-collected.
caller.
\method
{
close()
}
will also be called by Python's garbage
collector when the generator is garbage-collected.
If you need to run cleanup code when a
\exception
{
GeneratorExit
}
occurs,
If you need to run cleanup code when a
\exception
{
GeneratorExit
}
occurs,
I suggest using a
\code
{
try: ... finally:
}
suite instead of
I suggest using a
\code
{
try: ... finally:
}
suite instead of
...
@@ -1663,6 +1664,13 @@ single number as \file{pystone.py} does.
...
@@ -1663,6 +1664,13 @@ single number as \file{pystone.py} does.
\item
The
\module
{
pyexpat
}
module now uses version 2.0 of the Expat parser.
\item
The
\module
{
pyexpat
}
module now uses version 2.0 of the Expat parser.
(Contributed by Trent Mick.)
(Contributed by Trent Mick.)
\item
The
\class
{
Queue
}
class provided by the
\module
{
Queue
}
module
gained two new methods.
\method
{
join()
}
blocks until all items in
the queue have been retrieved and all processing work on the items
have been completed. Worker threads call the other new method,
\method
{
task
_
done()
}
, to signal that processing for an item has been
completed. (Contributed by Raymond Hettinger.)
\item
The old
\module
{
regex
}
and
\module
{
regsub
}
modules, which have been
\item
The old
\module
{
regex
}
and
\module
{
regsub
}
modules, which have been
deprecated ever since Python 2.0, have finally been deleted.
deprecated ever since Python 2.0, have finally been deleted.
Other deleted modules:
\module
{
statcache
}
,
\module
{
tzparse
}
,
Other deleted modules:
\module
{
statcache
}
,
\module
{
tzparse
}
,
...
@@ -2116,14 +2124,16 @@ The pysqlite module (\url{http://www.pysqlite.org}), a wrapper for the
...
@@ -2116,14 +2124,16 @@ The pysqlite module (\url{http://www.pysqlite.org}), a wrapper for the
SQLite embedded database, has been added to the standard library under
SQLite embedded database, has been added to the standard library under
the package name
\module
{
sqlite3
}
.
the package name
\module
{
sqlite3
}
.
SQLite is a C library that provides a SQL-language database that
SQLite is a C library that provides a lightweight disk-based database
stores data in disk files without requiring a separate server process.
that doesn't require a separate server process and allows accessing
the database using a nonstandard variant of the SQL query language.
Some applications can use SQLite for internal data storage. It's also
possible to prototype an application using SQLite and then port the
code to a larger database such as PostgreSQL or Oracle.
pysqlite was written by Gerhard H
\"
aring and provides a SQL interface
pysqlite was written by Gerhard H
\"
aring and provides a SQL interface
compliant with the DB-API 2.0 specification described by
compliant with the DB-API 2.0 specification described by
\pep
{
249
}
. This means that it should be possible to write the first
\pep
{
249
}
.
version of your applications using SQLite for data storage. If
switching to a larger database such as PostgreSQL or Oracle is
later necessary, the switch should be relatively easy.
If you're compiling the Python source yourself, note that the source
If you're compiling the Python source yourself, note that the source
tree doesn't include the SQLite code, only the wrapper module.
tree doesn't include the SQLite code, only the wrapper module.
...
@@ -2150,8 +2160,8 @@ c = conn.cursor()
...
@@ -2150,8 +2160,8 @@ c = conn.cursor()
# Create table
# Create table
c.execute('''create table stocks
c.execute('''create table stocks
(date t
imestamp, trans varchar, symbol varchar
,
(date t
ext, trans text, symbol text
,
qty
decimal, price decim
al)''')
qty
real, price re
al)''')
# Insert a row of data
# Insert a row of data
c.execute("""insert into stocks
c.execute("""insert into stocks
...
...
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