How to 'ignore' an error in Python?
jak
nospam at please.ty
Sat Apr 29 09:24:42 EDT 2023
Chris Angelico ha scritto:
> Using mkdirs when you only want to make one is inviting problems of
> being subtly wrong, where it creates too many levels of directory.
> Personally, I would just do:
Maybe I only say this because it has happened to me too many times but
before ignoring the error in the 'except' branch, I would make sure that
if the name exists it is a folder and not a file.
More information about the Python-list
mailing list