"Prepscius, Colin \(IT\)" <[EMAIL PROTECTED]> wrote:

> The last argument to new.function takes a closure, which is a tuple of
> cell objects.  Does anybody know how to create those cell objects 'by
> hand'?
> 

>>> def newcell():
        def f(): cell
        return f.func_closure[0]
        cell = None

>>> newcell()
<cell at 0x00C5DAB0: empty>

Hmm, looks like there's a bug here:

>>> cell.cell_contents

Traceback (most recent call last):
  File "<pyshell#15>", line 1, in <module>
    cell.cell_contents
SystemError: error return without exception set
>>> 
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to