Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / src / nas,5.n2.os.2 / lib / python / html / python / whatsnew / node3.html
CommitLineData
86530b38
AT
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<html>
3<head>
4<link rel="STYLESHEET" href="whatsnew24.css" type='text/css' />
5<link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" />
6<link rel='start' href='../index.html' title='Python Documentation Index' />
7<link rel="first" href="whatsnew24.html" title='What's New in Python 2.4' />
8<link rel='contents' href='contents.html' title="Contents" />
9<link rel='last' href='about.html' title='About this document...' />
10<link rel='help' href='about.html' title='About this document...' />
11<link rel="next" href="node4.html" />
12<link rel="prev" href="node2.html" />
13<link rel="parent" href="whatsnew24.html" />
14<link rel="next" href="node4.html" />
15<meta name='aesop' content='information' />
16<title>2 PEP 237: Unifying Long Integers and Integers</title>
17</head>
18<body>
19<DIV CLASS="navigation">
20<div id='top-navigation-panel' xml:id='top-navigation-panel'>
21<table align="center" width="100%" cellpadding="0" cellspacing="2">
22<tr>
23<td class='online-navigation'><a rel="prev" title="1 PEP 218: Built-In"
24 href="node2.html"><img src='../icons/previous.png'
25 border='0' height='32' alt='Previous Page' width='32' /></A></td>
26<td class='online-navigation'><a rel="parent" title="What's New in Python"
27 href="whatsnew24.html"><img src='../icons/up.png'
28 border='0' height='32' alt='Up One Level' width='32' /></A></td>
29<td class='online-navigation'><a rel="next" title="3 PEP 289: Generator"
30 href="node4.html"><img src='../icons/next.png'
31 border='0' height='32' alt='Next Page' width='32' /></A></td>
32<td align="center" width="100%">What's New in Python 2.4</td>
33<td class='online-navigation'><a rel="contents" title="Table of Contents"
34 href="contents.html"><img src='../icons/contents.png'
35 border='0' height='32' alt='Contents' width='32' /></A></td>
36<td class='online-navigation'><img src='../icons/blank.png'
37 border='0' height='32' alt='' width='32' /></td>
38<td class='online-navigation'><img src='../icons/blank.png'
39 border='0' height='32' alt='' width='32' /></td>
40</tr></table>
41<div class='online-navigation'>
42<b class="navlabel">Previous:</b>
43<a class="sectref" rel="prev" href="node2.html">1 PEP 218: Built-In</A>
44<b class="navlabel">Up:</b>
45<a class="sectref" rel="parent" href="whatsnew24.html">What's New in Python</A>
46<b class="navlabel">Next:</b>
47<a class="sectref" rel="next" href="node4.html">3 PEP 289: Generator</A>
48</div>
49<hr /></div>
50</DIV>
51<!--End of Navigation Panel-->
52
53<H1><A NAME="SECTION000300000000000000000">
542 PEP 237: Unifying Long Integers and Integers</A>
55</H1>
56
57<P>
58The lengthy transition process for this PEP, begun in Python 2.2,
59takes another step forward in Python 2.4. In 2.3, certain integer
60operations that would behave differently after int/long unification
61triggered <tt class="exception">FutureWarning</tt> warnings and returned values
62limited to 32 or 64 bits (depending on your platform). In 2.4, these
63expressions no longer produce a warning and instead produce a
64different result that's usually a long integer.
65
66<P>
67The problematic expressions are primarily left shifts and lengthy
68hexadecimal and octal constants. For example,
69<code>2 &lt;&lt; 32</code> results
70in a warning in 2.3, evaluating to 0 on 32-bit platforms. In Python
712.4, this expression now returns the correct answer, 8589934592.
72
73<P>
74<div class="seealso">
75 <p class="heading">See Also:</p>
76
77<dl compact="compact" class="seerfc">
78 <dt><a href="http://www.python.org/peps/pep-0237.html"
79 title="Unifying Long Integers and Integers"
80 >PEP 237, <em>Unifying Long Integers and Integers</em></a>
81 <dd>Original PEP
82written by Moshe Zadka and GvR. The changes for 2.4 were implemented by
83Kalle Svensson.
84 </dl>
85</div>
86
87<P>
88
89<DIV CLASS="navigation">
90<div class='online-navigation'>
91<p></p><hr />
92<table align="center" width="100%" cellpadding="0" cellspacing="2">
93<tr>
94<td class='online-navigation'><a rel="prev" title="1 PEP 218: Built-In"
95 href="node2.html"><img src='../icons/previous.png'
96 border='0' height='32' alt='Previous Page' width='32' /></A></td>
97<td class='online-navigation'><a rel="parent" title="What's New in Python"
98 href="whatsnew24.html"><img src='../icons/up.png'
99 border='0' height='32' alt='Up One Level' width='32' /></A></td>
100<td class='online-navigation'><a rel="next" title="3 PEP 289: Generator"
101 href="node4.html"><img src='../icons/next.png'
102 border='0' height='32' alt='Next Page' width='32' /></A></td>
103<td align="center" width="100%">What's New in Python 2.4</td>
104<td class='online-navigation'><a rel="contents" title="Table of Contents"
105 href="contents.html"><img src='../icons/contents.png'
106 border='0' height='32' alt='Contents' width='32' /></A></td>
107<td class='online-navigation'><img src='../icons/blank.png'
108 border='0' height='32' alt='' width='32' /></td>
109<td class='online-navigation'><img src='../icons/blank.png'
110 border='0' height='32' alt='' width='32' /></td>
111</tr></table>
112<div class='online-navigation'>
113<b class="navlabel">Previous:</b>
114<a class="sectref" rel="prev" href="node2.html">1 PEP 218: Built-In</A>
115<b class="navlabel">Up:</b>
116<a class="sectref" rel="parent" href="whatsnew24.html">What's New in Python</A>
117<b class="navlabel">Next:</b>
118<a class="sectref" rel="next" href="node4.html">3 PEP 289: Generator</A>
119</div>
120</div>
121<hr />
122<span class="release-info">Release 1.01.</span>
123</DIV>
124<!--End of Navigation Panel-->
125<ADDRESS>
126See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.
127</ADDRESS>
128</BODY>
129</HTML>