Closed vipul-sharma20 closed 7 years ago
Hi, yes indeed. I was coding and testing last month on 3.6 only. I would prefer this to be conditional, on py3.6 use exception I used and on py3.5 fallback to more general one. Something like
try:
ModuleNotFoundError
except NameError
ModuleNotFoundError = ImportError
in the beginning of the file
Yes, it seems decent. Updated in the latest commit.
Great, so much thanks.
Use
ImportError
in place ofModuleNotFoundError
ModuleNotFoundError
was introduced from Python 3.6import_module()
exceptions for Python version below 3.6, we can useImportError
ImportError
is a subclass ofModuleNotFoundError
Considering that this is meant to support Python 3.5 too
reference: https://docs.python.org/3/library/exceptions.html#ModuleNotFoundError
Thanks and you've done a nice work on this project.