pep 525: We don't have a hard requirement for finalizers anymore

This commit is contained in:
Yury Selivanov 2016-12-08 13:29:38 -08:00
parent 6b94a13802
commit 3e23210fe3
1 changed files with 2 additions and 5 deletions

View File

@ -215,13 +215,10 @@ problem, and everything just works.
generator is about to be GCed.
When an asynchronous generator is iterated for the first time,
it stores a reference to the current finalizer. If there is none,
a ``RuntimeError`` is raised. This provides a strong guarantee that
every asynchronous generator object will always have a finalizer
installed by the correct event loop.
it stores a reference to the current *finalizer*.
When an asynchronous generator is about to be garbage collected,
it calls its cached finalizer. The assumption is that the finalizer
it calls its cached *finalizer*. The assumption is that the finalizer
will schedule an ``aclose()`` call with the loop that was active
when the iteration started.