Python Forum
Thread Rating:
  • 2 Vote(s) - 2.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
From noun to verb
#17
Catching a general exception just with except: is not a good practice. What happens if the data can't be loaded. You return None or [] and you're thinking that something with your code is wrong or data is corrupted or something else.
Do some tests to see the most error you may get.

You can chain the exceptions one after another.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Messages In This Thread
From noun to verb - by MattaFX - May-22-2017, 03:23 PM
RE: From noun to verb - by micseydel - May-22-2017, 04:16 PM
RE: From noun to verb - by MattaFX - May-22-2017, 05:50 PM
RE: From noun to verb - by wavic - May-22-2017, 05:54 PM
RE: From noun to verb - by micseydel - May-22-2017, 06:04 PM
RE: From noun to verb - by sparkz_alot - May-22-2017, 07:08 PM
RE: From noun to verb - by MattaFX - May-23-2017, 05:58 AM
RE: From noun to verb - by Larz60+ - May-23-2017, 11:18 AM
RE: From noun to verb - by sparkz_alot - May-23-2017, 01:51 PM
RE: From noun to verb - by MattaFX - May-23-2017, 02:28 PM
RE: From noun to verb - by Larz60+ - May-23-2017, 05:59 PM
RE: From noun to verb - by MattaFX - May-23-2017, 11:18 PM
RE: From noun to verb - by ichabod801 - May-23-2017, 11:28 PM
RE: From noun to verb - by MattaFX - May-24-2017, 08:05 AM
RE: From noun to verb - by wavic - May-24-2017, 09:49 AM
RE: From noun to verb - by MattaFX - May-24-2017, 10:59 AM
RE: From noun to verb - by wavic - May-24-2017, 11:56 AM
RE: From noun to verb - by ichabod801 - May-24-2017, 08:43 PM
RE: From noun to verb - by wavic - May-24-2017, 11:18 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020