[Python-Dev] New PEP: 319
Martin v. Löwis
martin@v.loewis.de
15 Jun 2003 22:50:14 +0200
michel@dialnetwork.com writes:
> Comments, please send to me. I think python-dev is the right forum for
> discussion, otherwise someone will surely let me know and I'll go to
> python-list.
I find this underspecified. The section that says "Implementation"
really tries to explain what the *semantics* is of the proposed keywords,
yet it fails to spell out many interesting details.
For example, the PEP nowhere says what the semantics of the
"synchronize" keyword is. Apparently, execution may stop when entering
the synchronize block under certain circumstances. But under what
circumstances?
One may interpret that the example without synchronize is meant to do
the same thing as the code with synchronize, but this does not help
much, since I don't know what the "acquire_lock" and "release_lock"
global functions are.
Also, when talking about targets, I notice that these are
expressions. I assume that synchronization only happens when the
"same" object is used twice. What kind of "sameness" does that assume?
Are there really no restrictions? e.g. would
def foo():
synchronize "a"+"b":
print 1
def bar():
synchronize "a"+"b":
print 2
be valid? What would be the meaning of this code?
Regards,
Martin