Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.python Subject: Re: Future of Pypy? Date: Mon, 23 Feb 2015 17:50:24 -0800 Organization: A noiseless patient Spider Lines: 13 Message-ID: <871tlgaxi7.fsf@jester.gateway.pace.com> References: <87fv9xdb22.fsf@jester.gateway.pace.com> <54ea7ff4$0$12983$c3e8da3$5496439d@news.astraweb.com> <87zj85bcyu.fsf@jester.gateway.pace.com> <87lhjpb89i.fsf@jester.gateway.pace.com> <87h9udb1eq.fsf@jester.gateway.pace.com> <87bnkkb22u.fsf@jester.gateway.pace.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="0e072597111c5029870b25b8e5ee5406"; logging-data="32023"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/NXrQtHI1maBGQ2YUaqzmD" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:exbQBevANwqqgdjp5SaL5cIF49g= sha1:xbAY9V1/aC5j/xxajj2hKsdjdfM= Xref: csiph.com comp.lang.python:86284 Chris Angelico writes: >> What if you want to dynamically construct a callable and send it to >> another process? > I'm not sure what that would actually mean. Do you try to construct it > out of code that already exists in the other process? Are you passing > actual code to the other process? I gave an example in a reply to Steven, something like other_thread_queue.put(lambda x: x*x) to tell the other thread it is supposed to square something. It receives a callable and calls it in its own context.