Ah, yes, I remember this discussion from a while ago now. Has anyone picked up implementing the ()!
construct?
In another thread I am busy with trying to figure out how to make a python-style generator that produces IO
objects. The idea would be that the generator creates and opens the IO
, and the caller/consumer uses the object until the next item. Then when the caller is done with the object, the GC should come in and trigger a close()
on the IO
object. (If this would be the mechanism, the GC should probably also be triggered by a low-on-filedescriptors event).