[Python-Dev] While we're deprecating...

Thomas Wouters thomas@xs4all.net
Thu, 5 Jul 2001 15:35:22 +0200


On Thu, Jul 05, 2001 at 09:12:46AM -0400, Guido van Rossum wrote:
> > While we're in the deprecation mood (not that I changed my mind on xrage()
> > ;P) how about we deprecate the alternate-tab-size-comment checks of the
> > parser. That is, generate a deprecation warning for these comments:
> > 
> >                         "tab-width:",           /* Emacs */
> >                         ":tabstop=",            /* vim, full form */
> >                         ":ts=",                 /* vim, abbreviated form */
> >                         "set tabsize=",         /* will vi never die? */
> > 
> > with sizes other than '8', and rip out the code in 2.3 ?

> Was this ever even documented?  Is it worth being so careful?  We
> could rip out the functionality now, replacing it with a warning, and
> lose the warning in 2.3.  Or we could just rip it out now, and always
> enable the -t option.  (Hm, that should be unified with the warnings
> framework, although I'm not sure how easy that will be.)

Uhmm... if it wasn't documented, all the more reason to be careful.
Imagine, say,

# tab-width:4 (or however it's done)

<quadzillion of lines>

<4 spaces>for record in database:
< 8  spaces >  process_record
< 1 tab > del database

Now, I completely agree that that is very fragile code (imagine some emacs
loathing colleague removing the tab-width line) but that doesn't mean we
should just break it for the hell of it... We have it, we want to lose it,
we deprecate it. If we rip it out now (which I'd be -0 on) we should replace
it with an *error*, not a warning, since code has a high chance of breaking.

-- 
Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!