From: Norbert N. <Nor...@gm...> - 2004-12-02 18:24:18
|
Hi there, checking through the code of pytables, I fail to find much of a concept for which exception is thrown where. All the different standard exception types have well defined meanings: http://www.python.org/dev/doc/devel/lib/module-exceptions.html but it seems to me that pytables does not really follow these too closely. I'm mostly concerned about nonexistant objects. If I try to access/delete such an object in different contexts, I get all kinds of different exceptions, ranging from NameError over LookupError all the way to RuntimeError, where an AttributeError would seem most appropriate. Following the documentation * LookupError should never be used at all, since it is just the base for IndexError and KeyError. * NameError is meant for global or local symbols that do not exist * RuntimeError is just a fallback in cases where nothing else seems to fit. Is this matter just not defined too well, yet or is there a hidden concept behind the current state of affairs, that I just fail to see? Ciao, Norbert -- _________________________________________Norbert Nemec Bernhardstr. 2 ... D-93053 Regensburg Tel: 0941 - 2009638 ... Mobil: 0179 - 7475199 eMail: <No...@Ne...> |