Is there a way of making code like this pass pylint?  It's probably clear
from the code, but I'll say it anyway: I'm writing Python code that'll run
on multiple python interpreters, but none of those interpreters have all
100% of these modules:

try:
   # python 3
   import dbm.gnu as db_mod
except ImportError:
   # python 2
   try:
      import gdbm_ctypes as db_mod
      print('Using gdbm_ctypes')
   except ImportError:
      try:
         import gdbm as db_mod
      except ImportError:
         # this gets something that's kind of like bsddb on pypy 1.3 via
ctypes
         import dbm as db_mod

Thanks!

-- 
Dan Stromberg
_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to