> Offhand, my only quibble is that sys.exit is not helpful for debugging. > Much better to raise an error: > > if not self.funcTable.get(attribute, lambda x: True)(value): > raise ValueError ('error out of bound') > > or define a subclass of ValueError just for this purpose. On error, the > program will stop just as dead, but you'll get a trace. > > Mel.
I think generally I prefer my code to die and as long as I know where (from the statement) the error occurred I know generally what point I have to debug up until. Can you explain how your solution would be easier with a trace as I don't tend to use the raise/assert functionality so I am interested. thanks -- http://mail.python.org/mailman/listinfo/python-list