Re: A desperate lunge for on-topic-ness

Discussion in 'Python' started by Chris Angelico, Oct 18, 2012.

  1. On Thu, Oct 18, 2012 at 5:06 PM, Zero Piraeus <> wrote:
    > What are people's preferred strategies for dealing with lines that go
    > over 79 characters? A few I can think of off the bat:
    >
    > 1. Say "screw it" and go past 79, PEP8 be damned.
    >
    > 6. Realise that if it's that long, it probably shouldn't have been a
    > list comprehension in the first place.


    Depending on how far past, I'd be most inclined to one of these. I
    don't consider the eightieth character position to be sacrosanct, but
    on the other hand, I'm not going to go thousands of characters to the
    right. Most of my development screens will happily go to ~200
    characters, definitely above 100, so I tend to write a bit wider than
    PEP 8 demands. Generally I'd not look at splitting a line until it
    goes over 100-120 characters. (And even then, I won't automatically
    split it. I've been known to write some rather long lines of code.)
    When I do split, it's usually by dividing the line into multiple
    logical actions; if the split looks like type #5, I'll not split it.

    ChrisA
    Chris Angelico, Oct 18, 2012
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Zero Piraeus

    A desperate lunge for on-topic-ness

    Zero Piraeus, Oct 18, 2012, in forum: Python
    Replies:
    24
    Views:
    334
    Krzysztof Voss
    Oct 19, 2012
  2. Demian Brecht

    Re: A desperate lunge for on-topic-ness

    Demian Brecht, Oct 18, 2012, in forum: Python
    Replies:
    0
    Views:
    178
    Demian Brecht
    Oct 18, 2012
  3. Mark Lawrence

    Re: A desperate lunge for on-topic-ness

    Mark Lawrence, Oct 18, 2012, in forum: Python
    Replies:
    0
    Views:
    127
    Mark Lawrence
    Oct 18, 2012
  4. Jean-Michel Pichavant

    Re: A desperate lunge for on-topic-ness

    Jean-Michel Pichavant, Oct 18, 2012, in forum: Python
    Replies:
    2
    Views:
    154
    Demian Brecht
    Oct 19, 2012
  5. Chris Angelico

    Re: A desperate lunge for on-topic-ness

    Chris Angelico, Oct 18, 2012, in forum: Python
    Replies:
    0
    Views:
    144
    Chris Angelico
    Oct 18, 2012
Loading...

Share This Page