[New-bugs-announce] [issue1445] SystemError accessing uninitialised cell contents

Duncan Booth report at bugs.python.org
Thu Nov 15 11:27:48 CET 2007


New submission from Duncan Booth:

The following code throws a SystemError exception. cell_get_contents in
Objects\cellobject.c should check for a null op->ob_ref value and throw
an appropriate exception.

>>> def oops():
	def f(): cell
	f.func_closure[0].cell_contents
	cell = None

	
>>> oops()

Traceback (most recent call last):
  File "<pyshell#9>", line 1, in <module>
    oops()
  File "<pyshell#8>", line 3, in oops
    f.func_closure[0].cell_contents
SystemError: error return without exception set
>>>

----------
components: Interpreter Core
messages: 57525
nosy: duncanb
severity: normal
status: open
title: SystemError accessing uninitialised cell contents
type: behavior
versions: Python 2.5, Python 2.6

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1445>
__________________________________


More information about the New-bugs-announce mailing list