Home | Trees | Indices | Help |
|
---|
|
object --+ | dict --+ | FastStorage
Eventually this should replace class Storage but causes memory leak because of http://bugs.python.org/issue1469629
>>> s = FastStorage() >>> s.a = 1 >>> s.a 1 >>> s['a'] 1 >>> s.b >>> s['b'] >>> s['b']=2 >>> s['b'] 2 >>> s.b 2 >>> isinstance(s,dict) True >>> dict(s) {'a': 1, 'b': 2} >>> dict(FastStorage(s)) {'a': 1, 'b': 2} >>> import pickle >>> s = pickle.loads(pickle.dumps(s)) >>> dict(s) {'a': 1, 'b': 2} >>> del s.b >>> del s.a >>> s.a >>> s.b >>> s['a'] >>> s['b']
|
|||
new empty dictionary |
|
||
|
|||
|
|||
a shallow copy of D |
|
||
|
|||
|
|||
|
|||
None |
|
||
Inherited from Inherited from |
|
|||
Inherited from |
|
|||
Inherited from |
|
x.__init__(...) initializes x; see help(type(x)) for signature
|
x[y]
|
|
repr(x)
|
Update D from dict/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Mar 16 02:36:18 2014 | http://epydoc.sourceforge.net |