[Python-3000] Warning for 2.6 and greater
Thomas Wouters
thomas at python.org
Mon Jan 8 12:53:11 CET 2007
On 1/7/07, Anthony Baxter <anthony at interlink.com.au> wrote:
>> 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 would prefer -Wpy3k, or the corresponding warnings.filterwarnings call,
and just not warn in too many (used) places. Also, there are a number of
things I'd like to warn for, regardless of -3/-warn3/-Wp3yk, that will be
errors in py3k, but are already a bad idea: mixing tabs and spaces
(basically make -t the default), using `` (the repr syntax), using input().
(Also on my warn-TODO for 2.6 are coerce(), __get/set/delslice__, integer
division, __cmp__, passing floats to getargs.c's integer functions,
exceptions not deriving from BaseException, use of file.xreadlines(), and
implicit relative imports, but those should all (probably) be optional,
default off.)
--
Thomas Wouters <thomas at python.org>
Hi! I'm a .signature virus! copy me into your .signature file to help me
spread!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20070108/56b2bf58/attachment.html
More information about the Python-3000
mailing list