Re: tools to catch AttributeError and TypeError in python code?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: John Reiser <jreiser@xxxxxxxxxxxx>
> To: Development discussions related to Fedora <devel@xxxxxxxxxxxxxxxxxxxxxxx>
> Date: 10/22/2012 11:25
> Subject: tools to catch AttributeError and TypeError in python code?
> Sent by: devel-bounces@xxxxxxxxxxxxxxxxxxxxxxx
>
> What is the state of software tools to help catch and prevent
> AttributeError and TypeError in python code?  These two classes
> of errors occur often in the bugzilla reports for anaconda
> (recently:  
https://bugzilla.redhat.com/show_bug.cgi?id=868707 ).
> I'd like to see fewer AttributeError and TypeError.
>
> Because new attributes and types may be created at run time, in general
> errors may be even harder to find than in languages with static typing.
> Yet for most python code the set of types and attributes is semi-fixed.
> There are no changes at run time except due to importing modules
> which were created long ago.  During development, the set of types and
> attributes changes only in bursts, and often the bursts are weeks apart.
>
> The tools for python that I found by searching the web [0][1] seemed to be
> oriented more towards syntax and style, and not including AttributeError
> and TypeError.  Nothing even came close to the depth and thoroughness
> of BEAM [2] or Coverity [3] for C/C++.  Help?
>
> -----
> [0] google:  python code checker
> [1]
http://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis#Python
>    pychecker
>    pylint
> [2]
http://alexandria.tue.nl/extra2/afstversl/E/523798.pdf
>    (IBM "BEAM" checker [Bugs, Errors, And Mistakes]; Guido Volleberg, 1999)
>    *very* good: finds and prints an execution path which leads to null-pointer
>    errors in C and C++; includes call+return, loop+exit, conditionals, etc.
>    Notably helpful in the development of valgrind itself.
> [3]
http://www.coverity.com/products/quality-advisor.html


I'm having pretty good success with PyCharm from JetBrains.  Nothing will ever be as good as those for statically typed languages, but it's darned good at catching all sorts of things prior to run-time.  My python code has improved in reliability significantly thanks to PyCharm.  I've never been much of an IDE person in the past, but this tool has convinced me that they do have their uses.  I focus far more on the goal now.


--
John Florian


-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux