diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2006-03-17 15:56:41 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2006-03-17 15:56:41 (GMT) |
commit | da37604ee32cdefbb0184b7f34c97cf1aa1ec3cf (patch) | |
tree | 5ee2201ae6b9a8d37b2dd9d10ef99de575d0cce6 /Doc/whatsnew | |
parent | a0622709fd445f1afb095e6873ed167839b4d1b3 (diff) | |
download | cpython-da37604ee32cdefbb0184b7f34c97cf1aa1ec3cf.zip cpython-da37604ee32cdefbb0184b7f34c97cf1aa1ec3cf.tar.gz cpython-da37604ee32cdefbb0184b7f34c97cf1aa1ec3cf.tar.bz2 |
Add two items
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/whatsnew25.tex | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Doc/whatsnew/whatsnew25.tex b/Doc/whatsnew/whatsnew25.tex index 0662515..80917b1 100644 --- a/Doc/whatsnew/whatsnew25.tex +++ b/Doc/whatsnew/whatsnew25.tex @@ -489,6 +489,24 @@ class C(): %====================================================================== +\subsection{Interactive Interpreter Changes} + +In the interactive interpreter, \code{quit} and \code{exit} +have long been strings so that new users get a somewhat helpful message +when they try to quit: + +\begin{verbatim} +>>> quit +'Use Ctrl-D (i.e. EOF) to exit.' +\end{verbatim} + +In Python 2.5, \code{quit} and \code{exit} are now objects that still +produce string representations of themselves, but are also callable. +Newbies who try \code{quit()} or \code{exit()} will now exit the +interpreter as they expect. (Implemented by Georg Brandl.) + + +%====================================================================== \subsection{Optimizations} \begin{itemize} @@ -530,6 +548,14 @@ details. % datetime.datetime() now has a strptime class method which can be used to % create datetime object using a string and format. +\item In the \module{gc} module, the new \function{get_count()} function +returns a 3-tuple containing the current collection counts for the +three GC generations. This is accounting information for the garbage +collector; when these counts reach a specified threshold, a garbage +collection sweep will be made. The existing \function{gc.collect()} +function now takes an optional \var{generation} argument of 0, 1, or 2 +to specify which generation to collect. + \item A new \module{hashlib} module has been added to replace the \module{md5} and \module{sha} modules. \module{hashlib} adds support for additional secure hashes (SHA-224, SHA-256, SHA-384, and SHA-512). |