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 <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1445>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to