Guido van Rossum wrote: >>Maybe generators are not the way to go, but could be >>supported natively by providing a __block__ function, very similarly to >>sequences providing an __iter__ function for for-loops? > > Sorry, I have no idea what you are proposing here. I was suggesting that the feature could be a PEP310-like object and that a __block__ function (or whatever) of the generator could return such an object. But at this point, Nick's proposition is what I prefer. I find the use of generators very elegant, but I'm still unconvinced it is a good idea to use them to implement an acquire/release pattern. Even if another continuation mechanism would be used (like Steven's idea), it would still be a lot of concepts used to implement acquire/release. Regards, Nicolas
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