Oddbean new post about | logout
 I have another Python question. It's kind of a Best Practices question.

Python Pip has an "extras_require" feature which I interpret as being equivalent to Rust "features". If you pip install packagename[blargarg] you activate the blargarg extra and some additional packages will be installed.

Imagine a function in a package requires an extra. A user does not install the extra, then calls the function that requires it. What would you expect it to do? Throw an error? Which one?