Re: [Python-3000] Warning for 2.6 and greater

2007-01-08 Thread Thomas Wouters
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 t

Re: [Python-3000] Warning for 2.6 and greater

2007-01-08 Thread Anthony Baxter
On Monday 08 January 2007 22:53, Thomas Wouters wrote: > I would prefer -Wpy3k, or the corresponding > warnings.filterwarnings call, and just not warn in too many > (used) places. -W seems like an option. We can add other -W options later (for instance, -W tabs). Hm. -W already has a meaning, thou

Re: [Python-3000] Warning for 2.6 and greater

2007-01-08 Thread Thomas Wouters
On 1/8/07, Anthony Baxter <[EMAIL PROTECTED]> wrote: On Monday 08 January 2007 22:53, Thomas Wouters wrote: > I would prefer -Wpy3k, or the corresponding > warnings.filterwarnings call, and just not warn in too many > (used) places. -W seems like an option. We can add other -W options later (fo

Re: [Python-3000] self-contained exceptions

2007-01-08 Thread Collin Winter
On 1/8/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 09:14 PM 1/7/2007 -0600, Collin Winter wrote: > >The transformation is as Phillip outlined above, with extra logic to > >handle the case where e is a tuple or list. > > In the tuple or list case, there's no need to reset the variables, becau

Re: [Python-3000] self-contained exceptions

2007-01-08 Thread Phillip J. Eby
At 10:25 AM 1/8/2007 -0600, Collin Winter wrote: >On 1/8/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: >>At 09:14 PM 1/7/2007 -0600, Collin Winter wrote: >> >The transformation is as Phillip outlined above, with extra logic to >> >handle the case where e is a tuple or list. >> >>In the tuple or lis

Re: [Python-3000] self-contained exceptions

2007-01-08 Thread Collin Winter
On 1/8/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 10:25 AM 1/8/2007 -0600, Collin Winter wrote: > >On 1/8/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > >>At 09:14 PM 1/7/2007 -0600, Collin Winter wrote: > >> >The transformation is as Phillip outlined above, with extra logic to > >> >handl

Re: [Python-3000] self-contained exceptions

2007-01-08 Thread Phillip J. Eby
At 11:34 AM 1/8/2007 -0600, Collin Winter wrote: >On 1/8/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: >>At 10:25 AM 1/8/2007 -0600, Collin Winter wrote: >> >On 1/8/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: >> >>At 09:14 PM 1/7/2007 -0600, Collin Winter wrote: >> >> >The transformation is as Ph

Re: [Python-3000] self-contained exceptions

2007-01-08 Thread Eduardo \"EdCrypt\" O. Padoan
I seem to recall > that Guido wanted to move to an 'as' clause for Py3K anyway, to avoid the > "except FooExc, BarExc:" anti-pattern. So now seems as good a time "as" > any. :) http://mail.python.org/pipermail/python-dev/2006-March/062449.html http://mail.python.org/pipermail/python-dev/2006-

Re: [Python-3000] Lazy strings (was Re: Py3k release schedule worries)

2007-01-08 Thread Josiah Carlson
"Guido van Rossum" <[EMAIL PROTECTED]> wrote: > On 12/30/06, Talin <[EMAIL PROTECTED]> wrote: > > Maybe this would be a good time to review, or at least restate, the > > specific plans for strings in Py3K? I know that there's been a great > > deal of discussion on this, but a lot of that discussio

Re: [Python-3000] Warning for 2.6 and greater

2007-01-08 Thread Giovanni Bajo
Anthony Baxter wrote: > I'm not sure whether we should try and warn about 'print' becoming a > function. We should also consider things like intern() and > compile() (if they are to move to sys). I think it's fine if we prepare an upgrade path: for instance, we could add sys.intern() and sys.c

Re: [Python-3000] Warning for 2.6 and greater

2007-01-08 Thread Anthony Baxter
On Monday 08 January 2007 22:53, Thomas Wouters wrote: > (Also on my warn-TODO for 2.6 are coerce(), __get/set/delslice__ Should we warn on use of the __slice__ methods and the __cmp__ method, or hook into the object code to warn when they're defined? I guess the latter would be more proactive. O

Re: [Python-3000] Warning for 2.6 and greater

2007-01-08 Thread Aahz
On Tue, Jan 09, 2007, Anthony Baxter wrote: > On Monday 08 January 2007 22:53, Thomas Wouters wrote: >> >> (Also on my warn-TODO for 2.6 are coerce(), __get/set/delslice__ > > Should we warn on use of the __slice__ methods and the __cmp__ > method, or hook into the object code to warn when they'r

Re: [Python-3000] Warning for 2.6 and greater

2007-01-08 Thread Neal Norwitz
On 1/8/07, Anthony Baxter <[EMAIL PROTECTED]> wrote: > > Do we also want to warn about use of sq_slice and sq_ass_slice with > C-code objects? (And yes, my inner 12 year old still giggles about > sq_ass_slice) Sometimes it's nice to know you aren't alone. :-) > My concern is that having to dive i