Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit README to assume less background knowledge #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

njsmith
Copy link
Member

@njsmith njsmith commented Feb 1, 2019

Mainly to clarify that the async generator and async context manager
examples are actually two different examples, since Ninpo found this
confusing. But then once I started editing I of course changed more
than that :-).

Mainly to clarify that the async generator and async context manager
examples are actually two different examples, since Ninpo found this
confusing. But then once I started editing I of course changed more
than that :-).
@njsmith njsmith requested a review from Ninpo February 1, 2019 09:43
@codecov
Copy link

codecov bot commented Feb 1, 2019

Codecov Report

Merging #26 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master       #26   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines          972      1026   +54     
  Branches        77        79    +2     
=========================================
+ Hits           972      1026   +54     
Impacted Files Coverage Δ
async_generator/_impl.py 100.00% <0.00%> (ø)
async_generator/_util.py 100.00% <0.00%> (ø)
async_generator/_tests/conftest.py 100.00% <0.00%> (ø)
async_generator/_tests/test_util.py 100.00% <0.00%> (ø)
async_generator/_tests/test_async_generator.py 100.00% <0.00%> (ø)

`async generators <https://www.python.org/dev/peps/pep-0525/>`__. Just
like regular generators, they're super convenient; the difference is
that now you loop over them using ``async for``, and this means you
can use ``await`` inside them. If you're not doing async programming,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm worried this might not help the confusion between regular iterators, regular generators, async iterators (as introduced in 3.5 / PEP 492) and async generators (as introduced in 3.6 / PEP 525). This is not the place to go that deep in explanations. But since you're already giving pointers, it might be helpful to clarify that—just like generators are a nice way to write iterators—async generators are super useful to define async iterators.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants