Re: pylint woes

2016-05-10 Thread MRAB
On 2016-05-10 23:36, DFS wrote: [snip] If lists are still being created: * at every moment in time, len(list1) returns a length that doesn't change even if data is added to the list after the call to len(). Example: If the list has 100 items in it at the point len(list) is called: for i in ra

Re: pylint woes

2016-05-10 Thread DFS
On 5/7/2016 10:50 PM, Chris Angelico wrote: On Sun, May 8, 2016 at 12:15 PM, DFS wrote: The only reason for j in range(len(list1)): do something with list1[j], list2[j], list3[j], etc. or for item1, item2, item3 in zip(list1, list2, list3): do something with the items works is bec

Re: pylint woes

2016-05-08 Thread Steven D'Aprano
On Mon, 9 May 2016 07:24 am, DFS wrote: > On 5/8/2016 7:36 AM, Steven D'Aprano wrote: >> On Sun, 8 May 2016 11:16 am, DFS wrote: >> >>> address data is scraped from a website: >>> >>> names = tree.xpath() >>> addr = tree.xpath() >> >> Why are you scraping the data twice? > > > Because it exists

Re: pylint woes

2016-05-08 Thread Steven D'Aprano
On Mon, 9 May 2016 07:04 am, DFS wrote: > On 5/8/2016 11:51 AM, Steven D'Aprano wrote: >> On Mon, 9 May 2016 12:25 am, DFS wrote: >> > for j in range(len(nms)): > cSQL = "INSERT INTO ADDRESSES VALUES (?,?,?,?,?)" > vals = nms[j],street[j],city[j],state[j],zipcd[j] >> >> Why a

Re: pylint woes

2016-05-08 Thread DFS
On 5/8/2016 9:17 PM, Gregory Ewing wrote: Stephen Hansen wrote: The point is, you don't usually commit after an error happens. You rollback. He might want to commit the ones that *did* go in. That's not necessarily wrong. It all depends on the surrounding requirements and workflow. Bingo.

Re: pylint woes

2016-05-08 Thread Chris Angelico
On Mon, May 9, 2016 at 11:17 AM, Gregory Ewing wrote: > Stephen Hansen wrote: >> >> The point is, you don't usually commit after an error happens. You >> rollback. > > > He might want to commit the ones that *did* go in. > That's not necessarily wrong. It all depends on the > surrounding requireme

Re: pylint woes

2016-05-08 Thread Larry Hudson via Python-list
On 05/08/2016 03:07 PM, Chris Angelico wrote: On Mon, May 9, 2016 at 6:45 AM, Larry Hudson via Python-list wrote: On 05/08/2016 06:01 AM, Chris Angelico wrote: [snip...] ... I like to recommend a little thing called "IIDPIO debugging" - If In Doubt, Pr

Re: pylint woes

2016-05-08 Thread Gregory Ewing
Stephen Hansen wrote: The point is, you don't usually commit after an error happens. You rollback. He might want to commit the ones that *did* go in. That's not necessarily wrong. It all depends on the surrounding requirements and workflow. -- Greg -- https://mail.python.org/mailman/listinfo/p

Re: pylint woes

2016-05-08 Thread DFS
On 5/8/2016 6:05 PM, Stephen Hansen wrote: On Sun, May 8, 2016, at 02:46 PM, DFS wrote: On 5/8/2016 5:38 PM, Stephen Hansen wrote: On Sun, May 8, 2016, at 02:16 PM, DFS wrote: I was surprised to see the PEP8 guide approve of: "Yes: if x == 4: print x, y; x, y = y, x" https://www.python.org/d

Re: pylint woes

2016-05-08 Thread Chris Angelico
On Mon, May 9, 2016 at 6:49 AM, Dan Sommers wrote: > On Sun, 08 May 2016 23:01:55 +1000, Chris Angelico wrote: > >> ... I like to recommend a little thing called "IIDPIO debugging" - If >> In Doubt, Print It Out. That means: If you have no idea what a piece >> of code is doing, slap in a print()

Re: pylint woes

2016-05-08 Thread Chris Angelico
On Mon, May 9, 2016 at 6:45 AM, Larry Hudson via Python-list wrote: > On 05/08/2016 06:01 AM, Chris Angelico wrote: > [snip...] >> >> ... I like to recommend a >> little thing called "IIDPIO debugging" - If In Doubt, Print It Out. >> That means: If you have

Re: pylint woes

2016-05-08 Thread Stephen Hansen
On Sun, May 8, 2016, at 02:46 PM, DFS wrote: > On 5/8/2016 5:38 PM, Stephen Hansen wrote: > > On Sun, May 8, 2016, at 02:16 PM, DFS wrote: > >> I was surprised to see the PEP8 guide approve of: > >> > >> "Yes: if x == 4: print x, y; x, y = y, x" > >> > >> https://www.python.org/dev/peps/pep-0008/#p

Re: pylint woes

2016-05-08 Thread DFS
On 5/8/2016 5:38 PM, Stephen Hansen wrote: On Sun, May 8, 2016, at 02:16 PM, DFS wrote: I was surprised to see the PEP8 guide approve of: "Yes: if x == 4: print x, y; x, y = y, x" https://www.python.org/dev/peps/pep-0008/#pet-peeves That is not approving of that line of code as something to

Re: pylint woes

2016-05-08 Thread Joel Goldstick
On Sun, May 8, 2016 at 5:24 PM, DFS wrote: > On 5/8/2016 7:36 AM, Steven D'Aprano wrote: >> >> On Sun, 8 May 2016 11:16 am, DFS wrote: >> >>> address data is scraped from a website: >>> >>> names = tree.xpath() >>> addr = tree.xpath() >> >> >> Why are you scraping the data twice? > > > > Because

Re: pylint woes

2016-05-08 Thread Stephen Hansen
On Sun, May 8, 2016, at 02:16 PM, DFS wrote: > I was surprised to see the PEP8 guide approve of: > > "Yes: if x == 4: print x, y; x, y = y, x" > > https://www.python.org/dev/peps/pep-0008/#pet-peeves That is not approving of that line of code as something to mimic, its speaking *only* about *whi

Re: pylint woes

2016-05-08 Thread DFS
On 5/8/2016 7:36 AM, Steven D'Aprano wrote: On Sun, 8 May 2016 11:16 am, DFS wrote: address data is scraped from a website: names = tree.xpath() addr = tree.xpath() Why are you scraping the data twice? Because it exists in 2 different sections of the document. names = tree.xpath('//

Re: pylint woes

2016-05-08 Thread DFS
On 5/8/2016 1:25 PM, Steven D'Aprano wrote: On Sun, 8 May 2016 02:10 pm, DFS wrote: +-++ |bad-whitespace |65 | mostly because I line up = signs: var1 = v

Re: pylint woes

2016-05-08 Thread DFS
On 5/8/2016 11:15 AM, Chris Angelico wrote: On Mon, May 9, 2016 at 1:06 AM, DFS wrote: On 5/8/2016 10:36 AM, Chris Angelico wrote: On Mon, May 9, 2016 at 12:25 AM, DFS wrote: for category,name,street,city,state,zipcode in ziplists: try: db.execute(cSQL, vals) except (pyodbc.Err

Re: pylint woes

2016-05-08 Thread DFS
On 5/7/2016 2:43 PM, Peter Pearson wrote: On Sat, 7 May 2016 12:51:00 -0400, DFS wrote: This more-anal-than-me program generated almost 2 warnings for every line of code in my program. w t hey? Thank you for putting a sample of pylint output in front of my eyes; you inspired me to install py

Re: pylint woes

2016-05-08 Thread DFS
On 5/8/2016 11:51 AM, Steven D'Aprano wrote: On Mon, 9 May 2016 12:25 am, DFS wrote: for j in range(len(nms)): cSQL = "INSERT INTO ADDRESSES VALUES (?,?,?,?,?)" vals = nms[j],street[j],city[j],state[j],zipcd[j] Why are you assigning cSQL to the same string over and over again? I l

Re: pylint woes

2016-05-08 Thread Dan Sommers
On Sun, 08 May 2016 23:01:55 +1000, Chris Angelico wrote: > ... I like to recommend a little thing called "IIDPIO debugging" - If > In Doubt, Print It Out. That means: If you have no idea what a piece > of code is doing, slap in a print() call somewhere. It'll tell you > that (a) the code is actu

Re: pylint woes

2016-05-08 Thread Larry Hudson via Python-list
On 05/08/2016 06:01 AM, Chris Angelico wrote: [snip...] ... I like to recommend a little thing called "IIDPIO debugging" - If In Doubt, Print It Out. That means: If you have no idea what a piece of code is doing, slap in a print() call somewhere. It'll tel

Re: pylint woes

2016-05-08 Thread Steven D'Aprano
On Sun, 8 May 2016 02:10 pm, DFS wrote: > I mean I always use tab after : > > The program won't run otherwise. If I use spaces, 100% of the time it > throws: > > IndentationError: unindent does not match any outer indentation level Then you should be more careful about your spaces. If you inde

Re: pylint woes

2016-05-08 Thread Steven D'Aprano
On Mon, 9 May 2016 12:25 am, DFS wrote: >>> for j in range(len(nms)): >>> cSQL = "INSERT INTO ADDRESSES VALUES (?,?,?,?,?)" >>> vals = nms[j],street[j],city[j],state[j],zipcd[j] Why are you assigning cSQL to the same string over and over again? Sure, assignments are cheap, but they're

Re: pylint woes

2016-05-08 Thread Chris Angelico
On Mon, May 9, 2016 at 1:06 AM, DFS wrote: > On 5/8/2016 10:36 AM, Chris Angelico wrote: >> >> On Mon, May 9, 2016 at 12:25 AM, DFS wrote: >>> >>> for category,name,street,city,state,zipcode in ziplists: >>> try: db.execute(cSQL, vals) >>> except (pyodbc.Error) as programError: >>>

Re: pylint woes

2016-05-08 Thread Stephen Hansen
On Sun, May 8, 2016, at 08:06 AM, DFS wrote: > On 5/8/2016 10:36 AM, Chris Angelico wrote: > > ... and then you just commit???!? > > > > That's what commit() does. > I assure you, he knows what commit does :) The point is, you don't usually commit after an error happens. You rollback. Or correc

Re: pylint woes

2016-05-08 Thread Stephen Hansen
On Sun, May 8, 2016, at 07:25 AM, DFS wrote: > for nm,street,city,state,zipcd in zip(nms,street,city,state,zipcd): > > for vals in zip(nms,street,city,state,zipcd): > > nm,street,city,state,zipcd = vals > > cSQL = "INSERT INTO ADDRESSES VALUES (?,?,?,?,?)" > > > I like the first one bett

Re: pylint woes

2016-05-08 Thread DFS
On 5/8/2016 10:36 AM, Chris Angelico wrote: On Mon, May 9, 2016 at 12:25 AM, DFS wrote: for category,name,street,city,state,zipcode in ziplists: try: db.execute(cSQL, vals) except (pyodbc.Error) as programError: if str(programError).find("UNIQUE constraint failed") > 0:

Re: pylint woes

2016-05-08 Thread Chris Angelico
On Mon, May 9, 2016 at 12:25 AM, DFS wrote: > for category,name,street,city,state,zipcode in ziplists: > try: db.execute(cSQL, vals) > except (pyodbc.Error) as programError: >if str(programError).find("UNIQUE constraint failed") > 0: > dupeRow = True >

Re: pylint woes

2016-05-08 Thread DFS
On 5/7/2016 11:46 PM, Stephen Hansen wrote: On Sat, May 7, 2016, at 08:04 PM, DFS wrote: The lists I actually use are: for j in range(len(nms)): cSQL = "INSERT INTO ADDRESSES VALUES (?,?,?,?,?)" vals = nms[j],street[j],city[j],state[j],zipcd[j] The enumerated version would be: zi

Re: pylint woes

2016-05-08 Thread DFS
On 5/8/2016 1:50 AM, Jussi Piitulainen wrote: DFS writes: The lists I actually use are: for j in range(len(nms)): cSQL = "INSERT INTO ADDRESSES VALUES (?,?,?,?,?)" vals = nms[j],street[j],city[j],state[j],zipcd[j] The enumerated version would be: ziplists = zip(nms,street,city,sta

Re: pylint woes

2016-05-08 Thread Peter Otten
DFS wrote: > On 5/7/2016 2:52 PM, Christopher Reimer wrote: >> On 5/7/2016 9:51 AM, DFS wrote: >>> Has anyone ever in history gotten 10/10 from pylint for a non-trivial >>> program? >> >> I routinely get 10/10 for my code. While pylint isn't perfect and >> idiosyncratic at times, it's a useful too

Re: pylint woes

2016-05-08 Thread Peter Otten
Chris Angelico wrote: > On Sun, May 8, 2016 at 1:28 PM, DFS wrote: >> Invalid constant name "cityzip" (invalid-name) >> Invalid constant name "state" (invalid-name) >> Invalid constant name "miles" (invalid-name) >> Invalid constant name "store" (invalid-name) >> Invalid variable name "rs" (inval

Re: pylint woes

2016-05-08 Thread Chris Angelico
On Sun, May 8, 2016 at 10:50 PM, D'Arcy J.M. Cain wrote: > On Sun, 8 May 2016 14:21:49 +1000 > Chris Angelico wrote: >> if verbose: >> verbiage = print >> else: >> def verbiage(*args): pass > > I have never understood why the def couldn't start on the same line as > the else: > > if verbo

Re: pylint woes

2016-05-08 Thread D'Arcy J.M. Cain
On Sun, 8 May 2016 14:21:49 +1000 Chris Angelico wrote: > if verbose: > verbiage = print > else: > def verbiage(*args): pass I have never understood why the def couldn't start on the same line as the else: if verbose: verbiage = print else: def verbiage(*args): pass The colon effectiv

Re: pylint woes

2016-05-08 Thread Steven D'Aprano
On Sun, 8 May 2016 11:16 am, DFS wrote: > address data is scraped from a website: > > names = tree.xpath() > addr = tree.xpath() Why are you scraping the data twice? names = addr = tree.xpath() or if you prefer the old-fashioned: names = tree.xpath() addr = names but that raises the questio

Re: pylint woes

2016-05-07 Thread Jussi Piitulainen
DFS writes: > The lists I actually use are: > > for j in range(len(nms)): > cSQL = "INSERT INTO ADDRESSES VALUES (?,?,?,?,?)" > vals = nms[j],street[j],city[j],state[j],zipcd[j] > > > The enumerated version would be: > > ziplists = zip(nms,street,city,state,zipcd) > for nm,street,city,st

Re: pylint woes

2016-05-07 Thread Ian Kelly
On Sat, May 7, 2016 at 9:28 PM, DFS wrote: > But I think there are some pylint bugs here: > - > > standard import "import pyodbc, sqlite3" comes before "import pyodbc, > sqlite3" (wrong-import-order) > > * complains that the

Re: pylint woes

2016-05-07 Thread Chris Angelico
On Sun, May 8, 2016 at 2:40 PM, DFS wrote: >>> It says "Used builtin function 'filter'. Using a list comprehension can >>> be >>> clearer. (bad-builtin)" >> >> >> Kill that message and keep using filter. > > > > Unfortunately, 'bad-builtin' caught 2 truly bad uses of built-ins (zip() and > id()),

Re: pylint woes

2016-05-07 Thread DFS
On 5/7/2016 11:51 PM, Chris Angelico wrote: On Sun, May 8, 2016 at 1:28 PM, DFS wrote: Invalid constant name "cityzip" (invalid-name) Invalid constant name "state" (invalid-name) Invalid constant name "miles" (invalid-name) Invalid constant name "store" (invalid-name) Invalid variable name "rs"

Re: pylint woes

2016-05-07 Thread Chris Angelico
On Sun, May 8, 2016 at 2:10 PM, DFS wrote: >>> +-++ >>> |trailing-whitespace |59 | heh! >>> +-++ >>> |multiple-statements |23 | do this to save lines. >>> W

Re: pylint woes

2016-05-07 Thread DFS
On 5/7/2016 11:25 PM, Steven D'Aprano wrote: On Sun, 8 May 2016 02:51 am, DFS wrote: This more-anal-than-me program generated almost 2 warnings for every line of code in my program. w t hey? DFS comments +-++

Re: pylint woes

2016-05-07 Thread Chris Angelico
On Sun, May 8, 2016 at 1:38 PM, DFS wrote: >> This code is reeking with bad habits to be broken. Assigning a throwaway >> variable to walk the index is unnecessary when Python can do it for you >> behind the scenes. > > > Don't you think python also allocates a throwaway variable for use with zip

Re: pylint woes

2016-05-07 Thread Stephen Hansen
On Sat, May 7, 2016, at 08:28 PM, DFS wrote: > >> +-++ > >> |superfluous-parens |3 | I like to surround 'or' > >> statments with parens > > > > I would need examples to comment > > > if ("Please choose a

Re: pylint woes

2016-05-07 Thread Chris Angelico
On Sun, May 8, 2016 at 1:28 PM, DFS wrote: > Invalid constant name "cityzip" (invalid-name) > Invalid constant name "state" (invalid-name) > Invalid constant name "miles" (invalid-name) > Invalid constant name "store" (invalid-name) > Invalid variable name "rs" (invalid-name) ... huh?? The first

Re: pylint woes

2016-05-07 Thread Stephen Hansen
On Sat, May 7, 2016, at 08:04 PM, DFS wrote: > The lists I actually use are: > > for j in range(len(nms)): > cSQL = "INSERT INTO ADDRESSES VALUES (?,?,?,?,?)" > vals = nms[j],street[j],city[j],state[j],zipcd[j] > > > The enumerated version would be: > > ziplists = zip(nms,street,cit

Re: pylint woes

2016-05-07 Thread DFS
On 5/7/2016 2:52 PM, Christopher Reimer wrote: On 5/7/2016 9:51 AM, DFS wrote: Has anyone ever in history gotten 10/10 from pylint for a non-trivial program? I routinely get 10/10 for my code. While pylint isn't perfect and idiosyncratic at times, it's a useful tool to help break bad programmi

Re: pylint woes

2016-05-07 Thread DFS
On 5/7/2016 3:40 PM, Terry Reedy wrote: On 5/7/2016 12:51 PM, DFS wrote: This more-anal-than-me program generated almost 2 warnings for every line of code in my program. w t hey? If you don't like it, why do you use it? I've never used it before last night. I was shocked at what it spewed

Re: pylint woes

2016-05-07 Thread Steven D'Aprano
On Sun, 8 May 2016 02:51 am, DFS wrote: > This more-anal-than-me program generated almost 2 warnings for every > line of code in my program. w t hey? > > >DFS comments > +-++ --- > |messa

Re: pylint woes

2016-05-07 Thread DFS
On 5/7/2016 10:14 PM, Stephen Hansen wrote: On Sat, May 7, 2016, at 06:16 PM, DFS wrote: Why is it better to zip() them up and use: for item1, item2, item3 in zip(list1, list2, list3): do something with the items than for j in range(len(list1)): do something with list1[j], list2[j]

Re: pylint woes

2016-05-07 Thread Chris Angelico
On Sun, May 8, 2016 at 12:15 PM, DFS wrote: > On 5/7/2016 9:36 PM, Chris Angelico wrote: >> >> On Sun, May 8, 2016 at 11:16 AM, DFS wrote: >>> >>> street = [s.split(',')[0] for s in addr] >>> city = [c.split(',')[1].strip() for c in addr] >>> state = [s[-8:][:2] for s in addr] >>> zipcd = [z[

Re: pylint woes

2016-05-07 Thread MRAB
On 2016-05-08 03:14, Stephen Hansen wrote: On Sat, May 7, 2016, at 06:16 PM, DFS wrote: Why is it better to zip() them up and use: for item1, item2, item3 in zip(list1, list2, list3): do something with the items than for j in range(len(list1)): do something with list1[j], list2[j],

Re: pylint woes

2016-05-07 Thread DFS
On 5/7/2016 9:36 PM, Chris Angelico wrote: On Sun, May 8, 2016 at 11:16 AM, DFS wrote: On 5/7/2016 1:01 PM, Chris Angelico wrote: The suggestion from a human would be to use zip(), or possibly to change your data structures. Happens like this: address data is scraped from a website: names

Re: pylint woes

2016-05-07 Thread Stephen Hansen
On Sat, May 7, 2016, at 06:16 PM, DFS wrote: > Why is it better to zip() them up and use: > > for item1, item2, item3 in zip(list1, list2, list3): > do something with the items > > than > > for j in range(len(list1)): > do something with list1[j], list2[j], list3[j], etc. Although Ch

Re: pylint woes

2016-05-07 Thread Terry Reedy
On 5/7/2016 3:52 PM, Ray Cote wrote: Biggest issue I have with pyLint is that it complains when function parameters are indented twice vs. once. pyFlakes likes the twice. Example: def function_name( parm_1, long_parm_name, …. end_of_long_list_of params) parm_1

Re: pylint woes

2016-05-07 Thread Chris Angelico
On Sun, May 8, 2016 at 11:16 AM, DFS wrote: > On 5/7/2016 1:01 PM, Chris Angelico wrote: >> The suggestion from a human would be to use zip(), or possibly to >> change your data structures. > > > Happens like this: > > address data is scraped from a website: > > names = tree.xpath() > addr = tree

Re: pylint woes

2016-05-07 Thread DFS
On 5/7/2016 1:01 PM, Chris Angelico wrote: On Sun, May 8, 2016 at 2:51 AM, DFS wrote: [1] pylint says "Consider using enumerate instead of iterating with range and len" the offending code is: for j in range(len(list1)): do something with list1[j], list2[j], list3[j], etc. enumeration would

Re: pylint woes

2016-05-07 Thread Chris Angelico
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 tho

Re: pylint woes

2016-05-07 Thread Christopher Reimer
On 5/7/2016 12:52 PM, Ray Cote wrote: I’m impressed with 10/10. My approach is to ensure flake8 (a combination of pyflakes and pep8 checking) does not report any warnings and then run pyLint as a final check. I just installed pyflakes and ran it against my 10/10 files. It's not complaining ab

Re: pylint woes

2016-05-07 Thread Ray Cote
On Sat, May 7, 2016 at 2:52 PM, Christopher Reimer < christopher_rei...@icloud.com> wrote: > On 5/7/2016 9:51 AM, DFS wrote: > >> Has anyone ever in history gotten 10/10 from pylint for a non-trivial >> program? >> > > I routinely get 10/10 for my code. While pylint isn't perfect and > idiosyncrat

Re: pylint woes

2016-05-07 Thread Christopher Reimer
On 5/7/2016 12:23 PM, Stephen Hansen wrote: On Sat, May 7, 2016, at 11:52 AM, Christopher Reimer wrote: You can do better. You should strive for 10/10 whenever possible, figure out why you fall short and ask for help on the parts that don't make sense. I think this is giving far too much weigh

Re: pylint woes

2016-05-07 Thread Terry Reedy
On 5/7/2016 12:51 PM, DFS wrote: This more-anal-than-me program generated almost 2 warnings for every line of code in my program. w t hey? If you don't like it, why do you use it? I suppose the answer is that it did find a few things to check. You might be happier with pychecker, which is m

Re: pylint woes

2016-05-07 Thread Stephen Hansen
On Sat, May 7, 2016, at 11:52 AM, Christopher Reimer wrote: > You can do better. You should strive for 10/10 whenever possible, > figure out why you fall short and ask for help on the parts that don't > make sense. I think this is giving far too much weight to pylint's opinion on what is "good"

Re: pylint woes

2016-05-07 Thread Stephen Hansen
Pylint is very opinionated. Feel free to adjust its configuration to suit your opinions of style. In particular, several of these might be related to PEP8 style issues. On Sat, May 7, 2016, at 09:51 AM, DFS wrote: >DFS comments > +--

Re: pylint woes

2016-05-07 Thread Christopher Reimer
On 5/7/2016 9:51 AM, DFS wrote: Has anyone ever in history gotten 10/10 from pylint for a non-trivial program? I routinely get 10/10 for my code. While pylint isn't perfect and idiosyncratic at times, it's a useful tool to help break bad programming habits. Since I came from a Java background

Re: pylint woes

2016-05-07 Thread Peter Pearson
On Sat, 7 May 2016 12:51:00 -0400, DFS wrote: > This more-anal-than-me program generated almost 2 warnings for every > line of code in my program. w t hey? Thank you for putting a sample of pylint output in front of my eyes; you inspired me to install pylint and try it out. If it teaches me ev

Re: pylint woes

2016-05-07 Thread Michael Selik
On Sat, May 7, 2016 at 12:56 PM DFS wrote: > |mixed-indentation|186 | I always use tab > Don't mix tabs and spaces. I suggest selecting all lines and using your editor to convert spaces to tabs. Usually there's a feature to "tabify". > +-++ >

Re: pylint woes

2016-05-07 Thread Chris Angelico
On Sun, May 8, 2016 at 2:51 AM, DFS wrote: > [1] > pylint says "Consider using enumerate instead of iterating with range and > len" > > the offending code is: > for j in range(len(list1)): > do something with list1[j], list2[j], list3[j], etc. > > enumeration would be: > for j,item in enumerate(

pylint woes

2016-05-07 Thread DFS
This more-anal-than-me program generated almost 2 warnings for every line of code in my program. w t hey? DFS comments +-++ --- |message id |occurrences | +==