Re: PyChecker messages

2005-01-17 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Ben Sizer <[EMAIL PROTECTED]> wrote: >But you could use a dict of return values, or even just assigning a >different return value in each if clause. The end result is that you >have a single well-defined exit point from the function, which is >generally considered to

Re: PyChecker messages

2005-01-17 Thread John Roth
"Ben Sizer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] But you could use a dict of return values, or even just assigning a different return value in each if clause. The end result is that you have a single well-defined exit point from the function, which is generally considered to

Re: PyChecker messages

2005-01-17 Thread Ben Sizer
But you could use a dict of return values, or even just assigning a different return value in each if clause. The end result is that you have a single well-defined exit point from the function, which is generally considered to be preferable. -- http://mail.python.org/mailman/listinfo/python-list

Re: PyChecker messages

2005-01-16 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Roger Binns <[EMAIL PROTECTED]> wrote: . . . >> runner.py:200: Function (detectMimeType) has too many returns (11) >> >> The function is simply a long "else-if" clause, branching out to different

Re: PyChecker messages

2005-01-11 Thread Sylvain Thenault
On Tue, 11 Jan 2005 06:54:54 +, Frans Englich wrote: > Hello, Hi > I take PyChecker partly as an recommender of good coding practice You may alos be interested by Pylint [1]. Pylint is less advanced in bug detection than pychecker, but imho its good coding practice detection is more advan

Re: PyChecker messages

2005-01-11 Thread Eric Brunel
Frans Englich wrote: Hello, I take PyChecker partly as an recommender of good coding practice, but I cannot make sense of some of the messages. For example: runner.py:878: Function (main) has too many lines (201) What does this mean? Cannot functions be large? Or is it simply an advice that func

Re: PyChecker messages

2005-01-11 Thread Roger Binns
> runner.py:878: Function (main) has too many lines (201) > > What does this mean? Cannot functions be large? Or is it simply an advice that > functions should be small and simple? It is advice. > runner.py:200: Function (detectMimeType) has too many returns (11) > > The function is simply a long

stretching a string over several lines (Re: PyChecker messages)

2005-01-10 Thread Steven Bethard
Frans Englich wrote: Also, another newbie question: How does one make a string stretch over several lines in the source code? Is this the proper way? (1) print "asda asda asda asda asda asda " \ "asda asda asda asda asda asda " \ "asda asda asda asda asda asda" A couple of other op