On Thu, Oct 3, 2013 at 9:47 AM, Dennis Lee Bieber <wlfr...@ix.netcom.com> wrote:
>     try:
>         numItems = int(raw_input("\n\nHow many values? "))
>     except:     #naked exception is not really good programming
>         print "Invalid input, exiting..."
>         sys.exit(1)

Please don't _ever_ advocate this programming style! Wrapping
something in a try/except that emits a generic message and terminates
is a bad idea - the default behaviour, if you simply let the exception
happen, is to emit a very useful message and terminate. Never test for
any error condition you're not prepared to handle, as the BOFH advised
his boss.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to