falcon <[EMAIL PROTECTED]> wrote:
> It's idea was token from Ruby. But I think, good idea is good whatever it
> came from.
> It can be not Pythonic.
Just because something may be a good idea, doesn't mean that the idea is
Pythonic. The only person who can truely say is Guido, but you can gain
s
Sorry. I was wrong about "global" statement.
Then examples seems to be even more intricate:
def Synhronised(lock,func):
lock.acquire()
try:
func()
finally:
lock.release()
lock=Lock()
def Here_I_work(*a): return 1 # Stub
def asd(a): retur
"falcon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> def Synhronised(lock,func):
>lock.acquire()
>try:
>func()
>finally:
>lock.release()
>
> lock=Lock()
> def Some():
>local_var1=x
>local_var2=y
>local_var3
I know I came after the battle. And I have just another sight on context
managment.
Simple Context Managment may look in Python 2.4.1 like this:
Synhronized example:
def Synhronised(lock,func):
lock.acquire()
try:
func()
finally:
lock.rele