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

collector of next does not work #129

Closed
cjw296 opened this issue Nov 30, 2020 · 1 comment
Closed

collector of next does not work #129

cjw296 opened this issue Nov 30, 2020 · 1 comment

Comments

@cjw296
Copy link

cjw296 commented Nov 30, 2020

These docs show a collector of next:

https://github.com/glyph/automat/blame/master/docs/about.rst#L427-L430

...but I don't believe that can ever work, I think it needs to be itemgetter(0).

Given the common use of "return the first result of the output methods", perhaps this could be added to automat/__init__.py:

from operator import itemgetter
first = itemgetter(0)

...and then, obviously, add it to __all__?

For the docs, perhaps Sybil could be used to test these examples to ensure they are functional and correct?

@glyph
Copy link
Owner

glyph commented Mar 9, 2021

Thanks @cjw296 ! Want to make a pR?

@glyph glyph closed this as completed in 653080e Jun 27, 2021
glyph added a commit that referenced this issue Jun 27, 2021
Fix #129: Fix docs to remove invalid next
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

No branches or pull requests

2 participants