Hi Kenneth, A Wednesday 15 July 2009 00:42:25 Kenneth Arnold escrigué: > First, PyTables wins! The API has taken some getting used to (more on > that in a different post), but once I got things working, I've been > very happy with the performance.
Glad that it fits well for your purposes! > I dug out a mailing list post from last year and turned it into > http://www.pytables.org/moin/UserDocuments/CustomDataTypes. But I > still have some questions and thoughts: > > First, how does PyTables map back from _c_classId to class instances? > It appears to be metaclass magic, but I don't see it documented > anywhere. In general, what does a Table or Leaf subclass need in order > to work? Good point. That should definitely be documented in Users' Guide. I've filed a ticket about this: http://pytables.org/trac/ticket/237 > More significantly, should monkey-patching the creation function into the > File object be the recommended approach? For example, in the sparse-matrix > object I'm working on > (http://bazaar.launchpad.net/~commonsense/divisi/trunk/annotate/head%3A/csc >/divisi/pytables_tensor.py), Nice implementation of a sparse-matrix object indeed :) >I use 'create' and 'open' classmethods. (The > 'open' would be less > important if I subclassed Table instead of wrapping it. In general, > some people recommend wrapping external classes over subclassing; any > thoughts here?) Well, if you really want to hide PyTables details from the users, there is not much point in trying to subclass. However, the 'wrap' path may take you longer to implement, depending on what functionality are you willing to expose. YMMV, so I suppose that it is up to you to decide. > In fact, in my implementation, I want to hide as much of the details > of PyTables as possible from my users, so I only require a filename > (and use a default location within the HDF5 file). I use a file-handle > pool to avoid opening a file multiple times. So far it works very well > despite being extremely simplistic; what would you think about making > a proper implementation of a file-handle pool within PyTables proper? Ah, this would be a nice thing to have. Could you open a new ticket and provide the patch? Thanks! BTW, I've seen the improvements that you recently made to the PyTables wiki. A lot of thanks for that too! -- Francesc Alted ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Pytables-users mailing list Pytables-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pytables-users