|
From: SourceForge.net <no...@so...> - 2009-05-27 14:57:03
|
Bugs item #2797420, was opened at 2009-05-27 16:57 Message generated for change (Tracker Item Submitted) made by mfrasca You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=746843&aid=2797420&group_id=140566 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Mario Frasca (mfrasca) Assigned to: Nobody/Anonymous (nobody) Summary: unclear exception text when accessing non existing column Initial Comment: ValueError: list.index(x): x not in list is the standard python exception plus text when looking for an item in a list that does not contain the item. this exception is raised when you attempt accessing a non existing column. that 'x' does not really help finding what column you were trying to access, what about this: def indexOfFieldName(self, name): """Index of field named ``name``.""" # FIXME: move this to header class try: return self.header.fields.index(name) except ValueError: raise ValueError("can't find index of field '%s'" % name) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=746843&aid=2797420&group_id=140566 |