In defence of 80-char lines

  • Thread starter Steven D'Aprano
  • Start date
D

Dennis Lee Bieber

I also tend to prefer a maximum between 110 and 120 characters. I find continuation lines confusing, and when you use some third-party tools, such as wxPython, for example, the boilerplate code leads to some long lines.

I would hate to have to break up this line, for instance:

self.mainLabel.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, faceName = "FreeSans"))
Whereas I would consider breaking at the commas somewhat natural

self.mainLabel.SetFont(wx.Font(12,
wx.DEFAULT,
wx.NORMAL,
wx.BOLD,
faceName="FreeSans") )
 
R

Roy Smith

Kushal Kumaran said:
Is using csv.DictReader with delimiter=' ' not sufficient for this? I
did not actually read the regular expression in its entirety.

I believe your second sentence answers the question raised in your first
sentence :)
 
S

Steven D'Aprano

With "unicode fonts", where even the monospaced fonts present char
widths with a variable width depending on the unicode block (obvious
reasons), speaking of a "text width" in chars has not even a sense.

A properly-designed Unicode monospaced font should still be monospaced.
Or at worst, bispaced, if it also supports East Asian halfwidth and
fullwidth forms. In that case, the text width in chars should be
interpreted as halfwidth chars. Or if you prefer, the rule can be
interpreted as:

Line width should be no greater than 79 halfwidth characters, or 39
fullwidth characters, or some combination thereof.

http://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top