Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #7133
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'next,': 0.05; 'python': 0.08; '"hello': 0.09; 'function:': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'def': 0.12; 'wrote:': 0.14; 'f(a,': 0.16; 'from:addr:yahoo.com.ar': 0.16; 'iteration.': 0.16; 'lookup': 0.16; 'patching': 0.16; 'subject:GIL': 0.16; 'subject:alternative': 0.16; 'this?': 0.19; 'code': 0.24; 'function': 0.25; 'example': 0.27; 'sat,': 0.29; 'lot.': 0.30; 'patch': 0.32; 'steven': 0.32; 'header:X-Complaints-To:1': 0.32; 'to:addr:python-list': 0.33; 'thinking': 0.34; 'header:User- Agent:1': 0.35; '-0700,': 0.35; "d'aprano": 0.35; 'sometimes,': 0.35; 'useful': 0.37; 'change': 0.37; 'affects': 0.37; 'think': 0.38; 'received:org': 0.38; 'but': 0.38; 'subject:: ': 0.38; 'header:Mime-Version:1': 0.39; 'to:addr:python.org': 0.39; 'allows': 0.40; 'meaning': 0.40; 'john': 0.62; 'received:190': 0.74; '-0300,': 0.84; 'genellina': 0.84; 'gabriel': 0.91 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | "Gabriel Genellina" <gagsl-py2@yahoo.com.ar> |
| Subject | Re: GIL in alternative implementations |
| Date | Tue, 07 Jun 2011 01:03:55 -0300 |
| References | <4DE015EA.4040600@gmail.com> <mailman.2185.1306548406.9059.python-list@python.org> <4de1252d$0$2203$742ec2ed@news.sonic.net> <4de12b4b$0$29996$c3e8da3$5496439d@news.astraweb.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=iso-8859-1; format=flowed; delsp=yes |
| Content-Transfer-Encoding | 8bit |
| X-Gmane-NNTP-Posting-Host | 190.2.4.25 |
| User-Agent | Opera Mail/11.11 (Win32) |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2518.1307419262.9059.python-list@python.org> (permalink) |
| Lines | 37 |
| NNTP-Posting-Host | 82.94.164.166 |
| X-Trace | 1307419262 news.xs4all.nl 49174 [::ffff:82.94.164.166]:57763 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:7133 |
Show key headers only | View raw
En Sat, 28 May 2011 14:05:16 -0300, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> escribió:
> On Sat, 28 May 2011 09:39:08 -0700, John Nagle wrote:
>
>> Python allows patching code while the code is executing.
>
> Can you give an example of what you mean by this?
>
> If I have a function:
>
>
> def f(a, b):
> c = a + b
> d = c*3
> return "hello world"*d
>
>
> how would I patch this function while it is executing?
I think John Nagle was thinking about rebinding names:
def f(self, a, b):
while b>0:
b = g(b)
c = a + b
d = self.h(c*3)
return "hello world"*d
both g and self.h may change its meaning from one iteration to the next,
so a complete name lookup is required at each iteration. This is very
useful sometimes, but affects performance a lot.
--
Gabriel Genellina
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: GIL in alternative implementations Daniel Kluev <dan.kluev@gmail.com> - 2011-05-28 13:06 +1100
Re: GIL in alternative implementations Marc Christiansen <usenet@solar-empire.de> - 2011-05-28 11:55 +0200
Re: GIL in alternative implementations Wolfgang Rohdewald <wolfgang@rohdewald.de> - 2011-05-28 13:16 +0200
Re: GIL in alternative implementations John Nagle <nagle@animats.com> - 2011-05-28 09:39 -0700
Re: GIL in alternative implementations Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-28 17:05 +0000
Re: GIL in alternative implementations "Gabriel Genellina" <gagsl-py2@yahoo.com.ar> - 2011-06-07 01:03 -0300
Re: GIL in alternative implementations Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-06-07 07:09 +0000
Re: GIL in alternative implementations Jean-Paul Calderone <calderone.jeanpaul@gmail.com> - 2011-06-07 05:07 -0700
csiph-web