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
"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
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
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
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
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
> 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
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