agreed. and the try/except pattern also allows for try: import thing except ImportError: import slower_thing_with_same_api as thing 2013/12/27 Guido van Rossum <guido@python.org>
We shouldn't encourage optional dependencies. They often make code harder to reason about or harder to read.
On Thursday, December 26, 2013, Amber Yust wrote:
On Thu Dec 26 2013 at 8:57:42 PM, Gregory P. Smith <greg@krypto.org> wrote:
Such idioms are common. Though I don't think we should encourage their use.
Is this a case of "we shouldn't encourage optional dependencies" or "we shouldn't encourage this kind of idiom as a means of implementing optional dependencies" - and if the latter, what alternative would you point people at instead?
-- --Guido van Rossum (on iPad)
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/