Try Except Problem

Albert Hopkins marduk at letterboxes.org
Thu Sep 3 22:36:15 EDT 2009


On Tue, 2009-09-01 at 13:45 -0500, Victor Subervi wrote:
> Hi: I have this code:

[blah]

It's  hard to tell because:

     1. You posted code in HTML format, which is really hard to read
     2. Even when viewed as plain text, you use non-standard indentation
        which is really hard to read
     3. You used a blank except: clause that catches all exceptions.
        This is not good programming practice and makes it difficult to
        debug
     4. You didn't reduce your code down to the basic problem, or at
        least provide an alternative code snippet that others can try to
        duplicate
     5. You didn't show the actual output or provide what inputs were
        used.


In short, it basically looks like you typed or copied some code that is
not well written, discovered it doesn't work and expect the list to
debug your program for you.

Help us help you.






More information about the Python-list mailing list