Popular recipes tagged "backport" but not "sendfile"http://code.activestate.com/recipes/tags/backport-sendfile/2015-09-08T01:27:04-07:00ActiveState Code RecipesPython 2 nonlocal (Python)
2015-09-08T01:27:04-07:00Ryan Gonzalezhttp://code.activestate.com/recipes/users/4187447/http://code.activestate.com/recipes/578965-python-2-nonlocal/
<p style="color: grey">
Python
recipe 578965
by <a href="/recipes/users/4187447/">Ryan Gonzalez</a>
(<a href="/recipes/tags/backport/">backport</a>, <a href="/recipes/tags/nonlocal/">nonlocal</a>, <a href="/recipes/tags/python2/">python2</a>).
Revision 2.
</p>
<p>This implements nonlocal in Python 2...albeit in a slightly ugly way. Tested with CPython 2.7 and PyPy.</p>
A Simple Class for Transforming Python Source Files (Python)
2011-07-12T22:04:44-07:00Eric Snowhttp://code.activestate.com/recipes/users/4177816/http://code.activestate.com/recipes/577788-a-simple-class-for-transforming-python-source-file/
<p style="color: grey">
Python
recipe 577788
by <a href="/recipes/users/4177816/">Eric Snow</a>
(<a href="/recipes/tags/backport/">backport</a>, <a href="/recipes/tags/transform/">transform</a>).
Revision 3.
</p>
<p>Subclass with some replacements and you are ready to go. If the replacements aren't good enough simply override the transform() method.</p>