By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,660 Members | 1,187 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,660 IT Pros & Developers. It's quick & easy.

Creating a cell 'by hand'

P: n/a
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'?

Thanks!
Colin
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.
Nov 8 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Prepscius, Colin \(IT\)" <Co*************@morganstanley.comwrote:
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
>>>
Nov 9 '07 #2

P: n/a
Ben Finney a écrit :
"Prepscius, Colin (IT)" <Co*************@morganstanley.comwrites:
(snip)
>please destroy and notify sender.
Does that mean I should first destroy the sender ? And if so, how could
I *then* notify her ?-)
(Insert humour regarding different parsings of the grammar in the
above.)
Nov 9 '07 #3

P: n/a
On Fri, 09 Nov 2007 12:58:46 +0100, Bruno Desthuilliers wrote:
Ben Finney a écrit :
>"Prepscius, Colin (IT)" <Co*************@morganstanley.comwrites:
(snip)
>>please destroy and notify sender.

Does that mean I should first destroy the sender ? And if so, how could
I *then* notify her ?-)
Ask a medium? Use a crystal ball for the very long distance call? Call
Dr. Frankenstein for help? =:o)

Ciao,
Marc 'BlackJack' Rintsch
Nov 9 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.