Mercurial > p > roundup > code
annotate roundup/anypy/dbm_.py @ 5886:f4e77d446add
Clarify text.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 29 Sep 2019 22:42:54 -0400 |
| parents | d5da643b3d25 |
| children |
| rev | line source |
|---|---|
| 4360 | 1 # In Python 3 the "anydbm" module was renamed to be "dbm" which is now a |
| 2 # package containing the various implementations. The "wichdb" module's | |
| 3 # whichdb() function was moved to the new "dbm" module. | |
| 4 | |
| 5 try: | |
| 6 # old school first because <3 had a "dbm" module too... | |
| 7 import anydbm | |
| 8 from whichdb import whichdb | |
| 9 except ImportError: | |
| 10 # python 3+ | |
| 11 import dbm as anydbm | |
| 12 whichdb = anydbm.whichdb |
