Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Not to say that your concerns are pointless, and that things cannot be > improved somehow, but this is not that trivial, and there may be > ambuiguities in some not so rare cases.
It might be worth considering an alternative approach here: a formatted exception includes the relevant source lines (where possible). The source lines are cached by the module linecache.py and it probably wouldn't be too hard to build on the line cache so that it also scans the source lines looking for class statements and recording the start and end line numbers for each class. That way any classname displayed would be based on the actual source nesting and even static methods or functions injected from another class would work 'correctly' (at some level). -- Duncan Booth http://kupuguy.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list
