On 1/7/07, Anthony Baxter <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
_______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
