On Tue, Jan 5, 2010 at 8:50 AM, Michael Foord <span dir="ltr">&lt;<a href="mailto:fuzzyman@voidspace.org.uk">fuzzyman@voidspace.org.uk</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">




  

<div bgcolor="#ffffff" text="#000000"><div class="im">
On 05/01/2010 16:10, Juan Fernando Herrera J. wrote:
<blockquote type="cite">How about a new python 3 release with (possibly partial)
backwards compatibility with 2.6? I&#39;m a big 3 fan, but I&#39;m dismayed at
the way major software hasn&#39;t been ported to it. I&#39;m eager to use 3,
but paradoxically, the 3 release makes me rather stuck with 2.6. Excuse
me if this has been suggested in the past.<br>
  <pre>  </pre>
</blockquote>
<br></div>
I don&#39;t know about other developers, but I certainly expected Python 3
adoption to take a few years due to libraries only gradually making the
jump. I also expected there to be nervousness and pain around the
migration as well.<br>
<br>
I think in fact that libraries *are* migrating and there are lots of
encouraging signs. As a community we need to do all we can to promote
Python 3 adoption, but I don&#39;t think there is much reason to be worried
(or complacent for that matter). <br></div></blockquote><div><br></div><div>Michael is right, but doesn&#39;t answer the OP&#39;s implied question &quot;why can&#39;t 3.x be made backwards compatible with 2.6?&quot;</div>

<div><br></div><div>Unfortunately the answer isn&#39;t easy. I wish it was &quot;because we didn&#39;t have time to do it&quot; (since then the solution would be simply to call for more volunteers to help out) -- but unfortunately, it comes closer to &quot;we have no idea how to do it.&quot;</div>

<div><br></div><div>Py3k was designed to be backwards incompatible, because that gives the most long-term benefit of the language improvements. (Perhaps a better way of saying this is that in the design of language improvements, feature-by-feature backwards compatibility was intentionally not a requirement, even though keeping most of the language mostly unchanged *was* a requirement.)</div>

<div><br></div><div>In principle it would be possible to be more backwards compatible at the syntactic level, but that&#39;s not where the pain of porting code lies -- the major hurdles are typically he new way of thinking about Unicode (bytes vs. text strings, instead of 8-bit-strings vs. Unicode strings), and the changed semantics of dictionary keys and related APIs. Since these issues typically exist across modules (passing strings and dicts between modules is common), recognizing individual modules as &quot;2.x&quot; vs. &quot;3.x&quot; isn&#39;t possible.</div>

<div><br></div><div>Note, by the way, that you won&#39;t be &quot;stuck&quot; on 2.6 forever -- 2.7 alpha 1 was already released.</div></div><br>-- <br>--Guido van Rossum (<a href="http://python.org/~guido">python.org/~guido</a>)<br>