From: Francesc A. <fa...@ca...> - 2004-12-14 17:52:03
|
A Dimarts 14 Desembre 2004 16:39, Ivan Vilata i Balaguer va escriure: > 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. Ok. So I think the best would be to add a new file, say 'PTExceptions.py' where one can define the new exceptions and warnings like NodeNameWarning, AttributeNameWarning, although probably NaturalNameWarning (that would include both), would be better, and change the NameError by, say, NaturalNameWarning. That would allow the user to deal with both compliant and not compliant natural naming names, but if the latter is the case, a warning will be issued. I think this is a well-balanced solution. In this file one can also put other exceptions that would describe better the reasons of failure. =2D-=20 =46rancesc Altet Who's your data daddy? =A0PyTables |