#63 Proposal: remove form-feed characters in code
Closed: Invalid 2 years ago by bignose. Opened 2 years ago by jkugler.

To open:
1. I know I'm treading on holy territory here.
2. I've read this post: https://mail.python.org/pipermail//tutor/2015-March/104556.html
3. I know the primary author strongly prefers this coding style.

I would very much like to contribute to python-daemon. There are one or two tickets I think I could resolve pretty quickly, and maybe even become someone who helps maintain this library. I've used it in the past, and it's been very helpful.

I use WingIDE, the best PythonIDE I have ever tried (written in Python, for Python...unlike that other Python IDE). :)

I immediately ran in to problems with the form feed characters. WingIDE will show the form feed characters, but it will not allow me to copy or paste them. Also, I have my editor configured to remove all trailing whitespace on lines because I'm OCD like that and don't want trailing whitespace in my code. Since FF is considered whitespace that ends the line (it being the only thing on the line) the FF character is removed when I hit "save." This of course is not desired by the the project head at this time. At the same time, I would rather not modify the trailing-whitespace behavior each time I'm going to work on python-daemon (it's an editor-level setting, not a per-project setting).

In the e-mail referenced above, the project lead mentions using a "programmers editor" and believes all editors display FF characters and make it easy to insert them. I do not know if that is the case for PyCharm, but it appears the ability is only available in vi mode in WingIDE. Based on this bug report for IntelliJ, I'm going to guess PyCharm may have an issue with it as well: https://youtrack.jetbrains.com/issue/KTIJ-11100

The current "blame count" for python-daemon is as follows:

11306 Ben Finney
65 rnix
10 Alex Pyrgiotis
7 yenzenz
4 Miro Hrončok

I would posit that removing the FF characters would lower the friction for others contributing.

I would be happy to do the PR which removes the FF characters. And I'd be happy to contribute further. Jumping through hoops, or using a different IDE just for one project discourages me from contributing, and (in the case of using a different IDE/editor) makes me less efficient.

What say you?


Thank you for your interest. I'm sorry to say that your code editor is incorrect:

Since FF is considered whitespace that ends the line (it being the only thing on the line)

0+000C (FORM FEED) is not horizontal white space, it is vertical white space. In this, it is like 0+000A (LINE FEED), 0+000D (CARRIAGE RETURN), among others.

Since it is not horizontal white space, it should not count for “trailing” on a line as its semantics are not occupying any horizontal space.

So you should report that mistake as a bug in the code editor; and configure it correctly if feasible, or switch to something that works more with correct standards if not.

Metadata Update from @bignose:
- Issue close_status updated to: Invalid
- Issue status updated to: Closed (was: Open)

2 years ago

Thanks for the update. I'll see what I can do.

Login to comment on this ticket.

Metadata