7 ms·
One minor benefit of a compile-time version check, is that when the check fails, you're not left with useless .pyc files. Besides, __init__.py doesn't always e
by jwilk 4y ago
One minor benefit of a compile-time version check, is that when the check fails, you're not left with useless .pyc files.
Besides, __init__.py doesn't always exist.
- klyrs 4y agoIf you're trying to make a version-robust module that won't attempt to compile a syntax error, top-level dispatch through __init__.py is an excellent approach.