Python complaints
Gordon McMillan
gmcm at hypernet.com
Wed Nov 24 08:20:15 EST 1999
Thomas A. Bryan wrote:
> Mikael Olofsson wrote:
> >
> > On 24-Nov-99 Thomas Hamelryck wrote:
> > > Block delimitation by indenting.
> >
> > I am one of those who appreciates this. My reason is the
> > following:
>
> I generally don't mind this aspect of Python, but I've recently
> found that it can cause problems when transmitting code. For
> example, I saw some code that I wanted to copy in DejaNews c.l.py
> archives, but the lines wrap in narrow columns in DejaNews. I
> had to reindent the code. Grrr.
>
> I have also had problems when e-mailing code when I e-mail the
> code as text in the message instead of attaching a document.
>
> Is there a better way to transmit code so that possible
> indentation munging won't force the reader to reindent?
You're thinking of Tools/scripts/pindent.py.
The major no-no for email is using tabs in the indentation,
since most email clients happily turn them into spaces. See
http://www.python.org/ftp/python/contrib/System/tabcleaner.py
(among others) for a tool to transform indentation. Doesn't
deal with wrapped lines, but that's a comparatively minor
irritation.
- Gordon
More information about the Python-list
mailing list