Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

Do you really find python easier to read when lines are broken with a slash at 80 chars. I don't bother until twice that.


I'm not so sure about 160 chars, but I do agree that 80 chars is a little ridiculous these days. I have not yet one good argument for 80 chars.

Most terminals and monitors today will easily go to 100 chars, which is typically where I prefer to break lines. This gives room for 3-4 levels of nesting (using 4 char tabs), which is about the max depth you'd want to nest. There are exceptions of course but for the most part any more than 3-4 levels deep and you should be looking at refactoring.


Not really. I was doing "whatever fits on my 22 widescreen monitor", but a teammate asked me to keep on 80, and I started to change my style to make him happy.

Then a new member came to the team, and his coding style was not very good. I told him to read and follow PEP8, he downloaded some script which checks source for PEP8 compliance, and he really made the effort to format his code.

So, it's not something that I would personally go insane trying to keep width to 80, but when two things happened: I was already doing most of the PEP and my teammate wanted me to keep 80 chars, and I had to eat my own dogfood :) when the new person came on board.

In the end, it's something easy to do, and keep my colleagues happy.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: