From: Norbert N. <Nor...@gm...> - 2005-01-17 21:57:22
|
Am Montag, 17. Januar 2005 06:12 schrieb russ: > I would agree that the natural naming can easily get in the way. For > example, I tried storing stock data into pytables using the ticker > symbol as the table name. However, as it stands you can't use "def" as > a table name; the "checkNameValidity" function throws a NameError, since > "def" is a python reserved word. This problem should already be solved in the newest CVS version of pytables (just a little past 0.9.1, I think). A little while ago, it was the first step to allow non-pythonic names in the first place. Now it would be the second step to make it more convenient to access such names. > I think a preferable method would use getitem/setitem as the primary > mechanism to access tree nodes, allowing complete freedom in node name > specification. Then for cases where the naming allows, the > getattr/setattr could be used also, thus preserving the simplicity of > natural naming for the simple cases. Exactly. Especially the name-completion feature in certain interactive shells (e.g. ipython) really work together very well with natural naming. This will never be possible with other access methods. -- _________________________________________Norbert Nemec Bernhardstr. 2 ... D-93053 Regensburg Tel: 0941 - 2009638 ... Mobil: 0179 - 7475199 eMail: <No...@Ne...> |