Code Like a Pythonista: Idiomatic Python
One thing that has always bugged me about PEP8 is the advice about trying to keep line length to <80 characters. It seems a little dated.<p>I basically just completely ignore this part of the guidance, even though I know that in theory it makes it hard to edit code via a terminal. But this is not something we ever do in practice where I work - code on servers gets there only by being checked out of SVN.<p>I personally find it incredibly irritating when I see people who've split a function call over a couple of lines just to try and meet this criterion, e.g.:<p><pre><code>  def __init__(self, first, second, third,
             fourth, fifth, sixth):
</code></pre>
Note that if you're creating functions with very long signatures you're probably doing something wrong.<p>About the only time I make any kind of concession to the line length guidance is when I initialise a big dictionary, e.g.:<p><pre><code>  my_dict = {
      ham: eggs,
      bar: quux,
      # Snip 10 lines of code
      rhubarb: custard
  }
</code></pre>
(There are often better ways to do this too, but sometimes it's necessary for clarity to build a dictionary all at once like this.)<p>I'm perfectly happy to initialise dictionaries with a small number of keys just like this:<p><pre><code>  my_dict = { ham: eggs, bar: quux, rhubarb: custard }</code></pre>