Closed wbolster closed 10 years ago
Sample output with the changes introduced in commit b2e75b4:
>>> import plyvel
>>> db = plyvel.DB('/tmp/testdb', create_if_missing=True)
>>> db
<plyvel.DB with name '/tmp/testdb' at 0x0x2243b78>
>>> db.prefixed_db(b'foo')
<plyvel.PrefixedDB with prefix 'foo' at 0x0x234ad10>
>>> db.close()
>>> db
<plyvel.DB with name '/tmp/testdb' (closed) at 0x0x2243b78>
The
__repr__()
should include the database name, the state (open/closed) and (if applicable) the prefix.