Martin v. Löwis wrote: > Jason Orendorff schrieb: >> On 8/7/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >>> My concern is that people need to access existing databases. It's >>> all fine that the code accessing them breaks, and that they have >>> to actively port to Py3k. However, telling them that they have to >>> represent the keys in their dbm disk files in a different manner >>> might cause a revolt... >> Too true. Offhand, why not provide hooks for serializing and >> deserializing keys? > > Perhaps YAGNI? We already support pickling values (dbshelve), > and I added support for encoding/decoding strings as either > keys or values (though in a limited manner). > > In any case, somebody would have to make a specification > for that, and then somebody would have to provide an > implementation of it. > > Regards, > Martin
Just a thought... Would some sort of an indirect reference type help. Possibly an object_id_based_reference as keys instead of using or hashing the object itself? This wouldn't change if the object mutates between accesses and could be immutable. Ron _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
