[Python-3000] Warning for 2.6 and greater

Anthony Baxter anthony at interlink.com.au
Mon Jan 8 06:50:16 CET 2007


I've been thinking a little about how and where we'd add warnings to 
2.6 and later for things that will break in 3.0. My first idea is 
to add a command line option '-3' (or maybe '-warn3') implemented 
as "from __future__ import py3k". We can then put code in that 
optionally generates a warning if this is set. 

I'm concerned that we don't make this check too expensive, though - 
but it should be doable. A good proof-of-concept for someone keen 
(I'm totally out of time for the rest of this month) would be to 
whip up something that works and spits out a warning for, say, 
dictobject.c:dict_has_key(), but only when the flag is specified.

Anyone else have alternate ideas?

Anthony
-- 
Anthony Baxter     <anthony at interlink.com.au>
It's never too late to have a happy childhood.


More information about the Python-3000 mailing list