From 264f4b7fce1f94a54aea6f626f78988d3271654b Mon Sep 17 00:00:00 2001 From: Nicholas Chammas Date: Mon, 21 Nov 2016 11:24:42 -0500 Subject: [PATCH] show how to query implementation --- docs/index.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/index.rst b/docs/index.rst index cd4e7f0..64290c4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -30,6 +30,14 @@ To explicitly use a specific implementation, refer to the appropriate module:: import jellyfish._jellyfish as pyjellyfish import jellyfish.cjellyfish as cjellyfish +If you've already imported jellyfish and are not sure what implementation you +are using, you can check by querying ``jellyfish.library``:: + + if jellyfish.library == 'Python': + # Python implementation + elif jellyfish.library == 'C': + # C implementation + Indices and tables ==================