Re: Creating a cell 'by hand'

2007-11-09 Thread Duncan Booth
"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

[OT] Stupid email disclaimers (was: Creating a cell 'by hand')

2007-11-08 Thread Ben Finney
"Prepscius, Colin (IT)" <[EMAIL PROTECTED]> writes: > NOTICE: If received in error, If I've received it, it's not "received in error", it's received successfully. If, instead, you're referring to the actual recipient being different from the intended recipient, why are you putting this judgement

Re: Creating a cell 'by hand'

2007-11-08 Thread Chris Mellon
On Nov 8, 2007 5:30 PM, 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'? > Beyond copying them from an existing closure, you'll have to use the

Re: Creating a cell 'by hand'

2007-11-08 Thread Jean-Paul Calderone
On Thu, 8 Nov 2007 18:30:15 -0500, "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'? Here's one approach: >>> def f(): ... x = 10

Creating a cell 'by hand'

2007-11-08 Thread Prepscius, Colin (IT)
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 no