]> granicus.if.org Git - python/commitdiff
Add change to int() and OverflowError
authorAndrew M. Kuchling <amk@amk.ca>
Wed, 20 Nov 2002 13:50:15 +0000 (13:50 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Wed, 20 Nov 2002 13:50:15 +0000 (13:50 +0000)
Re-order the "porting" section to list items by decreasing significance

Doc/whatsnew/whatsnew23.tex

index 3c25238d5cb95fcde98d95576d691badbbaf12e4..27519557b90611edd83f3bc72aee158e4bd2e49e 100644 (file)
@@ -788,6 +788,12 @@ document.
 added along with the built-in \class{bool} type, as described in
 section~\ref{section-bool} of this document.
 
+\item The \function{int()} type constructor will now return a long
+integer instead of raising an \exception{OverflowError} when a string
+or floating-point number is too large to fit into an integer.  This
+can lead to the paradoxical result that
+\code{isinstance(int(\var{expression}), int)} is false, but that seems 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.
 
@@ -1602,18 +1608,15 @@ This section lists changes that may actually require changes to your code:
 \item \keyword{yield} is now always a keyword; if it's used as a
 variable name in your code, a different name must be chosen.
 
-\item You can no longer disable assertions by assigning to \code{__debug__}.
-
-\item Using \code{None} as a variable name will now result in a
-\exception{SyntaxWarning} warning.
-
-\item Names of extension types defined by the modules included with
-Python now contain the module and a \character{.} in front of the type
-name.
-
 \item For strings \var{X} and \var{Y}, \code{\var{X} in \var{Y}} now works
 if \var{X} is more than one character long.
 
+\item The \function{int()} type constructor will now return a long
+integer instead of raising an \exception{OverflowError} when a string
+or floating-point number is too large to fit into an integer.
+
+\item You can no longer disable assertions by assigning to \code{__debug__}.
+
 \item The Distutils \function{setup()} function has gained various new
 keyword arguments such as \var{depends}.  Old versions of the
 Distutils will abort if passed unknown keywords.  The fix is to check
@@ -1630,6 +1633,13 @@ if hasattr(core, 'get_distutil_options'):
 ext = Extension(**kw)
 \end{verbatim}
 
+\item Using \code{None} as a variable name will now result in a
+\exception{SyntaxWarning} warning.
+
+\item Names of extension types defined by the modules included with
+Python now contain the module and a \character{.} in front of the type
+name.
+
 \end{itemize}