archives

Python: Generator methods

This recipe enables the use of the yield statement within a method by decorating that method with a wrapper for a generator object.

Say what you will about Python, it does provide us with clever tricks such as this one.

Post new comment vs. reply

Does anyone else find it very tempting to accidentally use the "Post new comment" area to reply instead of clicking reply under the message, since that feels like such a natural place to reply?

I've done this like 20% of the time (submitted a top-level comment instead of a reply).

If others have the same problem, I wonder if the interface can be customized somehow to avoid/lessen the chances of this?