Should __future__ statements ever be phased out?

Paul Prescod paulp at ActiveState.com
Tue Mar 20 14:50:07 EST 2001


Hamish Lawson wrote:
> 
> ... However one
> day I give my program to a friend who (unknown to me) is still running
> Python 2.1. When he runs my program any print statements in it will
> behave differently from what I intended, but without any warning.

I see only two solutions to the problem you describe:

 1. Never make backwards incompatible changes

 2. Always have a version declaration or feature declaration at the top
of Python programs.

You already have the ability to implement 2 if you are paranoid. You can
check sys.version_info in your code.

-- 
Take a recipe. Leave a recipe.  
Python Cookbook!  http://www.activestate.com/pythoncookbook




More information about the Python-list mailing list