Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parasite form feed character in email.mime.text #48490

Closed
tarekziade mannequin opened this issue Oct 30, 2008 · 6 comments
Closed

parasite form feed character in email.mime.text #48490

tarekziade mannequin opened this issue Oct 30, 2008 · 6 comments
Labels
stdlib Python modules in the Lib dir

Comments

@tarekziade
Copy link
Mannequin

tarekziade mannequin commented Oct 30, 2008

BPO 4240
Nosy @smontanaro, @amauryfa, @vstinner, @tarekziade

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2008-10-30.09:13:40.582>
created_at = <Date 2008-10-30.08:13:00.324>
labels = ['invalid', 'library']
title = 'parasite form feed character in email.mime.text'
updated_at = <Date 2008-10-30.12:40:56.543>
user = 'https://github.com/tarekziade'

bugs.python.org fields:

activity = <Date 2008-10-30.12:40:56.543>
actor = 'skip.montanaro'
assignee = 'none'
closed = True
closed_date = <Date 2008-10-30.09:13:40.582>
closer = 'amaury.forgeotdarc'
components = ['Library (Lib)']
creation = <Date 2008-10-30.08:13:00.324>
creator = 'tarek'
dependencies = []
files = []
hgrepos = []
issue_num = 4240
keywords = []
message_count = 6.0
messages = ['75356', '75359', '75361', '75362', '75363', '75369']
nosy_count = 4.0
nosy_names = ['skip.montanaro', 'amaury.forgeotdarc', 'vstinner', 'tarek']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue4240'
versions = ['Python 2.6', 'Python 3.0', 'Python 3.1', 'Python 2.7']

@tarekziade
Copy link
Mannequin Author

tarekziade mannequin commented Oct 30, 2008

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

@tarekziade tarekziade mannequin added the stdlib Python modules in the Lib dir label Oct 30, 2008
@amauryfa
Copy link
Member

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.
"""

@tarekziade
Copy link
Mannequin Author

tarekziade mannequin commented Oct 30, 2008

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.

@tarekziade
Copy link
Mannequin Author

tarekziade mannequin commented Oct 30, 2008

ok so it seems there are around 150 occurences, so I guess it is OK in
this particular code base :D

@vstinner
Copy link
Member

^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.

@smontanaro
Copy link
Contributor

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

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

3 participants