Friday Filosofical Finking: Import protections
Manolo MartÃnez
manolo at austrohungaro.com
Thu Apr 18 12:10:30 EDT 2019
On 2019-04-17, DL Neil <PythonList at DancesWithMice.info> wrote:
> 2. When the program can still do something useful (if perhaps
> feature-limited) without the imported module by substituting
> something else in its place.
Isn't this a very common scenario, similar to what package management systems
call "optional dependencies"?
I maintain a small podcast aggregator that tags podcasts using an external
tagging library as an optional dependency---people can choose not to install it
if they don't care about tags. That library is imported within a try/except
block.
Manolo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 561 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20190418/d522d7c0/attachment.sig>
More information about the Python-list
mailing list