From: Ivan V. i B. <iv...@ca...> - 2004-12-14 15:39:51
|
Well, now I must say that the little piece of Python that Norbert sent has opened my eyes quite a lot! Wow! Thank you! I've always had the feeling that the imposition of natural naming for easy interactive access was in a way hindering some possible usage scenarios for PyTables. That became clearer to me while developing the tables.nodes.FileNode module, when I realized that files could be stored in a PyTables file easily, but their names would be a pain to keep (one would have to use the node's title or some other attribute). Wait, we even have a filesystem path-like naming scheme! Allowing non-pyhtonic ids in nodes would make node naming a lot easier for the user, specially when working with visual interfaces like ViTables, where interactive scripting is not required. This switch in PyTables behaviour should not cause backwards compatibility problems, I believe. On the other hand, since PyTables interactive ease of use is one of its distinctive features, I totally agree with issuing a warning when creating a non-pythonically named node. A new warning class (for instance, NodeNameWarning) should be used for that. In this way, if the user wants only natural naming, she can use the warning filter to turn these warnings into exceptions. Well, this is only my opinion... import disclaimer --=20 Ivan Vilata i Balaguer >qo< http://www.carabos.com/ C=E1rabos Coop. V. V V Enjoy Data "" |