undefined variable in list comprehension

2006-04-27
2013-03-15
  • Brad Clements

    Brad Clements - 2006-04-27

    I'm running 1.0.6 and pylint 0.11.0

    I'm not sure which one tackles this, but

    r = ["%02.f" % x for x in somelist]

    gives me an undefined variable error on the first 'x'

     
    • Fabio Zadrozny

      Fabio Zadrozny - 2006-04-27

      Hi Brad, that seems like a PyLint bug, so, you should report this to the PyLint guys (the code-analysis in the extensions does that correctly for me).

      Cheers,

      Fabio

       
      • Brad Clements

        Brad Clements - 2006-04-27

        I do have pydev extensions. Are you saying I should turn off "use pylint"?

        I am confused by your statement "the code-analysis in the extensions does that correctly for me".

         
        • Fabio Zadrozny

          Fabio Zadrozny - 2006-04-27

          Well, that's up to you:

          You can use the code-analysis from the extensions, the code-analysis from Pylint or both.

          But if you want to use only the extensions code-analysis, then, yes, you should turn off 'use pylint'.

           

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks