Backwards Compatibility of Python versions

phil hunt philh at comuno.freeserve.co.uk
Mon Feb 4 19:39:41 CET 2002


On 04 Feb 2002 03:18:59 -0800, Paul Rubin <phr-n2002a at nightsong.com> wrote:
>"Tim Peters" <tim.one at home.com> writes:
>> > That's the problem--if I don't import future division, my code will
>> > break in the future, because the // operator isn't supported in the
>> > present.
>> 
>> Not so:  introducing "//" was 100% backward-compatible, so isn't controlled
>> by __future__.  "//" works out of the box in 2.2, no __future__ required.
>
>If I type "3//4" into 1.5.2 or 2.1, I get a SyntaxError exception, so
>it isn't backwards compatible.

If you are *depending* on getting this exception for your program to
work, then it doesn't deserve to work anyway.


-- 
===== Philip Hunt ===== philh at comuno.freeserve.co.uk =====
Herbivore, a zero-effort email encryption system. Details at:
<http://www.vision25.demon.co.uk/oss/herbivore/intro.html>






More information about the Python-list mailing list