This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: parasite form feed character in email.mime.text
Type: Stage:
Components: Library (Lib) Versions: Python 3.0, Python 3.1, Python 2.7, Python 2.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, skip.montanaro, tarek, vstinner
Priority: normal Keywords:

Created on 2008-10-30 08:13 by tarek, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (6)
msg75356 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2008-10-30 08:12
Hi, 

There's a parasite form feed character in email/mime/text.py 
(as well in python 2.4 and 2.5)

I caught that under vim (^L), it is located line 12 in the file,
the line before the class definition starts
msg75359 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-10-30 09:13
PEP 8 does not call them parasites:
http://www.python.org/dev/peps/pep-0008/

"""
Python accepts the control-L (i.e. ^L) form feed character as
whitespace; Many tools treat these characters as page separators, so you
may use them to separate pages of related sections of your file.
"""
msg75361 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2008-10-30 09:24
so basically, if I open email.py, it is perfectly OK to have is opened
in two pages in an editor ?

How weird ! 


PEP 8 also says that we should be consistent throughout a code base.

If this was the case everywhere in sdtlib, I'd say ok, but imho this
should be removed because this is the first time I see such a FF in there.
msg75362 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2008-10-30 09:30
ok so it seems there are around 150 occurences, so I guess it is OK in
this particular code base :D
msg75363 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2008-10-30 09:33
^L is used for a printer to insert a new blank page. But who really 
print a source code on a printer? Or does some editor have a special 
usage of this *control sequence*?

It looks like ^L is used in Lib/smtpd.py as a hack for some editors so 
jump to the different classes, but there are other tools to jump to 
the classes.
msg75369 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2008-10-30 12:40
Perhaps final comment here.  The email package was authored by Barry
Warsaw.  That's the way he prefers to break his code into sections.
Definitely neither parasitic nor accidental.

Skip
History
Date User Action Args
2022-04-11 14:56:40adminsetgithub: 48490
2008-10-30 12:40:56skip.montanarosetnosy: + skip.montanaro
messages: + msg75369
2008-10-30 09:33:47vstinnersetnosy: + vstinner
messages: + msg75363
2008-10-30 09:30:57tareksetmessages: + msg75362
2008-10-30 09:24:03tareksetmessages: + msg75361
2008-10-30 09:13:40amaury.forgeotdarcsetstatus: open -> closed
resolution: not a bug
messages: + msg75359
nosy: + amaury.forgeotdarc
2008-10-30 08:13:00tarekcreate