Message74282
Unrelated to this bug, I would like to have the ability to remove the
reference to the frame from the traceback object. Specifically so that
the traceback object could be stored for a while without keeping all
the locals alive as well.
So, periodically I test to see if python allows that. Python 2.6 gave
some strange results compared to 2.5.2:
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> try:
... x = dskjfds
... except:
... import sys
... t, v, tb = sys.exc_info()
...
>>> tb
<traceback object at 0x01396670>
>>> dir(tb)
['tb_frame', 'tb_lasti', 'tb_lineno', 'tb_next']
>>> tb.tb_frame
<frame object at 0x01371598>
>>> tb.tb_frame = None
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'traceback' object has only read-only attributes (assign
to .tb_frame)
>>>
Python 2.6 (r26:66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> try:
... x = lfdskf
... except:
... import sys
... t, v, tb = sys.exc_info()
...
>>> tb
<traceback object at 0x01581F80>
>>> dir(tb)
['tb_frame', 'tb_lasti', 'tb_lineno', 'tb_next']
>>> tb.tb_frame
<frame object at 0x013B9E10>
>>> tb.tb_frame = None
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'traceback' object has no attribute 'tb_frame'
>>> |
|
Date |
User |
Action |
Args |
2008-10-03 23:31:59 | ghazel | set | recipients:
+ ghazel |
2008-10-03 23:31:59 | ghazel | set | messageid: <1223076719.45.0.395696576555.issue4034@psf.upfronthosting.co.za> |
2008-10-03 23:31:58 | ghazel | link | issue4034 messages |
2008-10-03 23:31:57 | ghazel | create | |
|