Jul-14-2017, 10:35 PM
(Jul-14-2017, 08:22 PM)DeaD_EyE Wrote: Instead of checking every possible possibility, you should use try: except:
I don't think this should be taken as a hard and fast rule. The try statement is more efficient if you don't have an error, the if statement is more efficient if you do have an error. If the file is likely to be there you should use try, if it is likely to not be there you should use if.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures