On Sun, Jun 15, 2003, Guido van Rossum wrote: > [Aahz] >> On Sun, Jun 15, 2003, michel@dialnetwork.com wrote: >>> >>> After doing a whole heck of a lot of Java and Jython programming over >>> the last year I decided to work an idea of mine into a PEP after being >>> impressed with Java thread syncronization and frustrated with Python >>> (it's almost always the other way around...) >>> >>> http://www.python.org/peps/pep-0319.html >> >> You need to be *much* clearer about the proposed interface between the >> ``synchronize`` keyword and Python objects. > > I agree with Aahz; especially the scope of the lock used by an > anonymous synchronize block is ambiguous in the current PEP. In one > example it appears that there is a lock associated with each > unqualified use of the synchronize keyword; in another, it seems that > unqualified uses in the same class share a lock. > > Please try to explain the semantics of named and unnamed synchronize > calls entirely in terms of code that would work in current Python, > without using English (other than "this code is equivalent to that > code"). It occurs to me that my comment was actually insufficiently clear: what I mean by "interface" is, "What methods get called on which Python objects?" In particular, read closely the documentation on such things as iterators (and the way they work with ``for`` loops) and the sequence/mapping protocol. -- Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/ "If you don't know what your program is supposed to do, you'd better not start writing it." --Dijkstra
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4