[Python-projects] pylint bug (unreachable code)

Vincent Legoll vincent.legoll at gmail.com
Tue Mar 3 00:16:04 CET 2009


Hello,

I searched a bug tracker for pylint, but cannot find anything
relevant on your website... That would be cool to search for
already reported bugs before asking to the ML...

So, here is my question:

In the following code:

======================
def a():
        try:
                return
        except:
                return

        raise Exception('a')
======================

Pylint does not report unreachable code, whereas
if we remove the try / except from around the return,
it does...

Is this an already known deficiency ?
Is this not detectable ?

Thanks.

P.S. I'm using pylint to find defects in the meld diff viewer
source code, and it's working great !

-- 
Vincent Legoll


More information about the Python-Projects mailing list