Contribute Media
A thank you to everyone who makes this possible: Read More

Decorators and Context Managers

Translations: en

Summary

Learn how decorators and context managers work, see several popular examples, and get a brief intro to writing your own. Decorators wrap your functions to easily add more functionality. Context managers use the 'with' statement to make indented blocks magical. Both are very powerful parts of the python language; come learn how to use them in your code.

Details

Improve this page