19
2017-08-22 11:57:30 +08:00
@bestkayle
https://www.python.org/dev/peps/pep-0333/#specification-details
If the iterable returned by the application has a close() method, the server or gateway must call that method upon completion of the current request, whether the request was completed normally, or terminated early due to an error (this is to support resource release by the application). This protocol is intended to complement PEP 325's generator support, and other common iterables with close() methods.