On Tue, Jun 7, 2011 at 2:22 PM, Ian Kelly wrote:
> from functools import partial
>
> def g(value):
> print(value)
> return partial(g, value+1)
>
> f = partial(0)
> for i in range(1):
> f = f()
The "partial(0)" should read "partial(g, 0)", of course.
--
http://mail.python.org/mailman
On Tue, Jun 7, 2011 at 11:51 AM, Ethan Furman wrote:
>> I'm not sure where he gets the idea that this has any impact on
>> concurrency, though.
>
> What if f has two calls to self.h() [or some other function], and self.h
> changes in between?
>
> Surely that would be a major headache.
I could ima
Carl Banks wrote:
On Monday, June 6, 2011 9:03:55 PM UTC-7, Gabriel Genellina wrote:
En Sat, 28 May 2011 14:05:16 -0300, Steven D'Aprano
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 w
On Monday, June 6, 2011 9:03:55 PM UTC-7, Gabriel Genellina wrote:
> En Sat, 28 May 2011 14:05:16 -0300, Steven D'Aprano
> 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
On Jun 7, 12:03 am, "Gabriel Genellina"
wrote:
> En Sat, 28 May 2011 14:05:16 -0300, Steven D'Aprano
> 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
On Tue, 07 Jun 2011 01:03:55 -0300, Gabriel Genellina wrote:
> En Sat, 28 May 2011 14:05:16 -0300, Steven D'Aprano
> 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
En Sat, 28 May 2011 14:05:16 -0300, Steven D'Aprano
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
11 2:22 PM
*To:* python-list@python.org >> Python List
*Subject:* GIL in alternative implementations
Hello everyone,
I've already read quite a bit about the reasons for the GIL in
CPython, i.e to summarize, that a more-fine graine locking, allowing
real concurrency in multithreaded applic
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
On 5/27/2011 7:06 PM, Daniel Kluev wrote:
So I'd like to know: how do these other implementations handle concurrency
matters for their primitive types, and prevent them from getting corrupted
in multithreaded programs (if they do) ? I'm not only thinking about python
types, but also primitive con
On Samstag 28 Mai 2011, Marc Christiansen wrote:
> And I wouldn't rely on 3.2
> not to break.
it breaks too like it should, but only rarely
like one out of 10 times
i5:/pub/src/gitgames/kajongg/src$ python3.2 test.py
100
i5:/pub/src/gitgames/kajongg/src$ python3.2 test.py
100
i5:/pub/sr
Daniel Kluev wrote:
>> So I'd like to know: how do these other implementations handle
>> concurrency matters for their primitive types, and prevent them from
>> getting corrupted in multithreaded programs (if they do) ? I'm not only
>> thinking about python types, but also primitive containers and
Daniel Kluev wrote:
> test.py:
>
> from threading import Thread
> class X(object):
>pass
> obj = X()
> obj.x = 0
>
> def f(*args):
> for i in range(1):
> obj.x += 1
>
> threads = []
> for i in range(100):
>t = Thread(target=f)
>threads.append(t)
>t.start()
>
> for t
> So I'd like to know: how do these other implementations handle concurrency
> matters for their primitive types, and prevent them from getting corrupted
> in multithreaded programs (if they do) ? I'm not only thinking about python
> types, but also primitive containers and types used in .Net and J
14 matches
Mail list logo