Is this the right time to post a feature request ? It's about pickling weakrefs: let's assume i 've created 3 class instances >>> class A: ... pass >>> a = A() >>> b = A() >>> c = A() >>> a.b = b #put b into a >>> a.ref_b = weakref.ref(b) #weakref to b >>> a.ref_c = weakref.ref(c) #weakref to c now i pickle around >>> data = pickle.dumps(a) >>> new_a = pickle.loads(data) now i would like to have: new_a is my unpickled a new_a.b is my unpickled b new_a.ref_b is an weakref to new_a.b new_a.ref_c is an dead weakref (c was not pickled because it's just weakly-referenced) weakrefs are not supported by the default, but this kind of 'support' could not (i didn't get it ;) be added using the copy_reg module, but it seems to be very useful; weakrefs could used as an "pickling-barrier"... what do you think? Arne
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4