From: Francesc A. <fa...@op...> - 2003-07-16 20:37:04
|
A Dimecres 16 Juliol 2003 21:03, vareu escriure: > Oh ok, I misunderstood what you were implementing lazily. > > Regarding memory, I wasn't clear. > > If you do an, hdf_load(file), you'll get something that acts like a > python dictionary > that will load off of the disk the data when needed. It's not like a > pickle which loads everything off of the disk into memory. However, be certain that you are not duplicating the functionality provided by the "natural naming" implementation. For example, given the tree: root / a / b / \ a c(Table) you can already access an object in this way: root.a.b.c. Interpreting a Table object as a dictionary, would be just a matter of providing a __getitem__ and __setitem__ methods to Table. So that: file.root.a.b.c["var1"] can be an alias of file.root.a.b.c.read(field="var1") and the same for Group: file.root.a.b[1] or: file.root.a.b["c"] would be the same as: file.root.a.b.c Maybe this is what you want. In fact, I was planning to implement that in the next release (specially for Table objects, but I'm still not sure about Group). That would fulfill your goal?. -- Francesc Alted |