Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: pylint woes Date: Sun, 8 May 2016 07:56:37 +1000 Lines: 28 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de PT0SXb4RxWAtEL+rM5Iy6A2VGg0Uxv8JU/xN57TMFJog== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.023 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'yet.': 0.03; 'cc:addr :python-list': 0.09; 'complaining': 0.09; 'yeah,': 0.09; "hasn't": 0.15; '120,': 0.16; '2016': 0.16; 'code?': 0.16; 'commented': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'limit,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'still,': 0.16; 'weigh': 0.16; 'wrote:': 0.16; 'skip:+ 40': 0.18; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'am,': 0.23; 'code,': 0.23; '(or': 0.23; 'split': 0.23; 'header:In-Reply-To:1': 0.24; 'external': 0.27; 'message-id:@mail.gmail.com': 0.27; 'complain': 0.29; 'long.': 0.29; 'code': 0.30; 'programmers': 0.30; 'point': 0.33; 'michael': 0.33; 'wrap': 0.33; "i'll": 0.33; 'list': 0.34; 'received:google.com': 0.35; 'but': 0.36; 'too': 0.36; 'instead': 0.36; 'lines': 0.36; 'received:209.85': 0.36; 'depends': 0.36; 'subject:: ': 0.37; 'agree': 0.37; 'doing': 0.38; 'received:209': 0.38; 'files': 0.38; 'data': 0.39; 'rather': 0.39; 'some': 0.40; 'your': 0.60; 'entire': 0.61; 'per': 0.62; 'limit': 0.65; "they're": 0.66; 'levels': 0.70; 'exceed': 0.72; 'sounds': 0.76; 'opt': 0.79; 'exceeded': 0.83; '*how': 0.84; 'chrisa': 0.84; 'skip:| 10': 0.84; 'to:none': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc; bh=p8OMNwC7ck395ORxmUmelTVq1mJs+NLlKiM+TPzwUDE=; b=cDPXpwcQb/tR8Wx43K/mmeaE+KPkhjYbCCpweLlkWltfVC7wnVLqRuA09v2sjUJ0Jd kyWYXL6vAd2/GWoLgcod5hmG8og8W6ArfVrj0OkhruHFhHr104bhkFv9do9hDmjpgaRf zD4vDsbW4AAO/A1MQ5PeW2jCHWWH2t4iatIFeJbF3LIg8M9iOq8UTIi2Pw+/ejF8N1Rc vOK5nY6vS2/dU2fed48bARVbadXILusfNylSyLIBdX9c2UIz1HMavHqCZJOsW2NeG/QZ ELaxrBb9MDMXYNq2x8PtxnxpI/9sdGyVGw39Pvwp457QPbc5mWihYw6C4EDDAn9mIdjv lQLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc; bh=p8OMNwC7ck395ORxmUmelTVq1mJs+NLlKiM+TPzwUDE=; b=G07/YmjDkHKJoGoXxa/wzzwnRDk6MzWXtTjNYW4mj3T8sWricEoXkSEiRfgFa9hLSG aDzXJ8bK3Qrt3lZdT11prrTMv8oESpBUBJdF7pj64D23MTrTh0nVgnw1GunZr8/P0eXD o7NtHkafvuxN57U7Jq3pqxyRydpTyuGtD7ZGkvGNMi94sKcVQtEUA6xjt908CN3hDiVz w2En9UJUqRZTLiaq5g0j8+rNg4XteB+L22oaveDmDGTrdpERcgiaJEEgN1/n8Vwnzumj QMSlYUimGIKvNidiXdt995Vr5W736yQ3NE5DpkAPQWQXEcDnaxDh07+zC+RV+HMeJLvj ow0A== X-Gm-Message-State: AOPr4FVH4ejGmdLHqepuj9YG2XjR+ZFz/E44OcTRmoERH9pBpPyi/dAGU63mpBb8XZiKwrIq3JawdnwiUcYcqg== X-Received: by 10.25.148.69 with SMTP id w66mr1634705lfd.28.1462658197334; Sat, 07 May 2016 14:56:37 -0700 (PDT) In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: Xref: csiph.com comp.lang.python:108302 On Sun, May 8, 2016 at 4:42 AM, Michael Selik wrote: > >> +-------------------------+------------+ >> |line-too-long |5 | meh >> > > Yeah, I think 80 characters can be somewhat tight. Still, 5 long lines in > 200ish lines of code? Sounds like you might be doing too much in those > lines or have too many levels of indentation. > "Sparse is better than dense" > "Flat is better than nested" Others have commented on this, but I'll weigh in with one point that hasn't been mentioned yet. A lot of tools will complain when you exceed 80 (or 79) characters per line; but it depends somewhat on *how far* you exceeded it. Some people opt instead for a 100-character limit, or even 120, but most programmers agree that a 200-character line (or more!) is too long. So if this is complaining about five lines out of your entire program that just snuck over the 80-character limit (eg 86 characters long), it's not a concern, and my recommendation would be to relax the restriction. And if those few lines are ginormous hunks of data (static list initialization, or something), you might consider dumping them out to external files rather than wrapping them into big code blocks. But if they're truly long lines of code, wrap or split them. ChrisA