From: Norbert N. <Nor...@gm...> - 2005-01-16 17:01:18
|
Am Sonntag, 16. Januar 2005 16:35 schrieb Ivan Vilata i Balaguer: > [...] > Please note I that intentionally left out > __set{item,attr}__ because this is a greater change. File.create*() > calls would be changed to direct constructor invocation for leaves and > groups, a thing which I definetly think Right and perfectly plausible > (but I might be wrong). I don't quite understand: it already is possible to do mygroup.somename = Array(somevalue) to create an array. Where is the "greater change"? Actually, I never liked the File.create*() method to create elements. > [...] > (but they would be kept for compatibility). I would recommend spicing as much as possible with DeprecatedWarning messages. Offering too many alternatives is more confusing than helpful. > Imagine issuing: > >>> # h5file.root.detector.readout <=> > >>> tbl = h5file.root['detector/readout'] or tbl = h5file.root['detector']['readout'] Anyhow: I don't see much gain here. Just the question whether you do the '/' parsing or not. Don't have much of an opinion there. > >>> # h5file.root.column['name column'].attrs.temperature <=> > >>> attr = h5file.root['column/name column/attrs/temperature'] I have no idea what that's supposed to mean... > I think this should be quite easy to implement and would make > building pathnames and traversing them a pleasure, keeping interactive > behaviour the same. Maybe even File.__???{item,attr}__ could be > tailored to defer to the root group object invocations using an item / > attribute starting with '/', so that using h5file['/detector/readout'] > would be possible... -- _________________________________________Norbert Nemec Bernhardstr. 2 ... D-93053 Regensburg Tel: 0941 - 2009638 ... Mobil: 0179 - 7475199 eMail: <No...@Ne...> |