A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-April/099212.html below:

[Python-Dev] Traceback object has no __class__?

[Python-Dev] Traceback object has no __class__? [Python-Dev] Traceback object has no __class__?Greg Ewing greg.ewing at canterbury.ac.nz
Sun Apr 11 12:43:14 CEST 2010
I thought type-class unification was supposed to mean
that all objects now have a __class__ attribute. But
traceback objects don't seem to:

import sys

try:
   raise ValueError
except ValueError:
   tb = sys.exc_info()[2]
   print tb
   print tb.__class__

results in:

% python2.6 traceback_class.py
<traceback object at 0x82dc8>
Traceback (most recent call last):
   File "traceback_class.py", line 8, in <module>
     print tb.__class__
AttributeError: __class__

-- 
Greg
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4