logoalt Hacker News

dataflowtoday at 12:30 AM1 replyview on HN

What is the right way to handle an optional dependency?


Replies

rtpgtoday at 4:32 AM

I think this import flow tends to be the canonical one.

I might recommend doing something like importing from something like `numpy.version` (or some other "random" very small utils package) so that the work done on file load is still fairly small.