Re:Python Generator Tricks
by praptak on Thursday September 30, 2010 @06:24AM
(#1742826)
Python's own @contextmanager decorator ( http://docs.python.org/library/contextlib.html#contextlib.co... ) uses generators in quite a clever way. You can grok quite a lot about Python generators by trying to figure out what @contextmanager actually does under the hood.
[ Parent
| on HN ]
There are no comments on this comment yet.