Non-Indented python

Steve Holden sholden at holdenweb.com
Wed Nov 28 11:42:31 EST 2001


"Nicholas FitzRoy-Dale" <wzdd at lardcave.net> wrote in message
news:mailman.1006874692.24069.python-list at python.org...
> On 27 Nov, Terry Reedy wrote:
> > "Marcin 'Qrczak' Kowalczyk" <qrczak at knm.org.pl> wrote in message
> > news:slrna071tg.isc.qrczak at qrnik.zagroda...
>
> >> What should a Python interpreter do with this?
> >>
> >> <TAB>if 0:
> >> <TAB><TAB>print "0"
> >> <SPACE><SPACE><SPACE><SPACE><SPACE><SPACE><SPACE><SPACE>print "1"
> >
> > Raise SyntaxError.
> >
> > Seriously.
> >
> > This would be consistent with general philosophy of not guessing in
> > the face of ambiguity.
>
> Insofar as my opinion makes any difference, I'd like to second that
> suggestion. The huge tab/space war above notwithstanding, I think that
> regardless of your preference, any file with mixed space/tab indenting
> is inherently evil and will only cause pain. I was aimlessly toying with
> the idea of writing a little utility to detect mixed space/tab indents
> in files and setting it to run whenever I do a CVS checkout or update,
> but I always welcome the opportunity to banish devilry on a more
> far-reaching scale. :)
>

see tabnanny.py, reindent.py, and various others

no-wheel-reinvention-this-week-ly y'rs  - steve
--
http://www.holdenweb.com/








More information about the Python-list mailing list