Thursday, March 31, 2011

With statement...

The best explanation of the motivations behind the with statement..

http://effbot.org/zone/python-with-statement.htm

Fabric obviously uses a lot of with statements and provides its own context managers:

http://docs.fabfile.org/en/1.0.1/api/core/context_managers.html#fabric.context_managers.settings

Fabric also uses the nested function with the contextlib ilbrary:

http://docs.python.org/library/contextlib.html#contextlib.nested

No comments:

Post a Comment