[Python-ideas] Tweaking closures and lexical scoping to include the function being defined

Nick Coghlan ncoghlan at gmail.com
Mon Sep 26 19:05:13 CEST 2011


On Mon, Sep 26, 2011 at 11:55 AM, Steven D'Aprano <steve at pearwood.info> wrote:
> Yuval Greenfield wrote:
>> Hasn't python given enough temptations to avoid multithreading already?
>
> One can never have enough reasons to avoid multi-threading! <wink>
>
> But seriously, unless this proposal makes things *worse*, I don't see why
> this is an objection.

I actually think the 'attractive nuisance' aspect wrt multi-threading
is a potentially valid objection.

OTOH, it also makes synchronising parts of process global algorithms
*much* easier, since you can just do "nonlocal lock from
threading.RLock()" to get a shared lock variable.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-ideas mailing list