Hi List,

I'm about to merge the links branch into trunk, but suddenly it occurred to me 
a new idea on how to dereferring soft/external links.  Currently, these links 
work like this:

f = tb.openFile('links.h5', 'w')
g = f.createGroup('/', 'g')
a1 = f.createCArray(g, 'a', tb.Int64Atom(), shape=(10000,))
la = f.createSoftLink('/', 'la', '/g/a')  # /la points to /g/a

and dereferring la is implemented via the `__call__()` method:

a2 = la()  # a2 is the 'a' CArray

But I think now that perhaps it would be better to implement dereferencing via 
a property (say `target`):

a2 = la.target  # a2 is the 'a' CArray

That would allow to natural naming to work even through links referring to 
groups.  For example, if lg

lg = f.createSoftLink('/', 'lg', '/g')  # /lg points to /g

then we could do:

a3 = f.root.lg.target.a  # a3 is the 'a' CArray

which I think is consistent with the way that PyTables uses to access nodes. 
What people think?

Cheers,

-- 
Francesc Alted

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to