On Sun, 02 Jan 2005 01:04:06 GMT, Steven Bethard <[EMAIL PROTECTED]> wrote: >PEP 288 was mentioned in one of the lambda threads and so I ended up > reading it for the first time recently. I definitely don't like the > idea of a magical __self__ variable that isn't declared anywhere. It > also seemed to me like generator attributes don't really solve the > problem very cleanly. An example from the PEP[1]: > > [snip]
You may be interested in greenlets. They solve this problem in a way which is conceptually much simpler and cleaner. They are available as a third party extension, and unfortunately are not terribly well documented yet (but luckily they are quite simple). http://codespeak.net/svn/user/arigo/greenlet/ Jp -- http://mail.python.org/mailman/listinfo/python-list