Closed cjw296 closed 3 years ago
These docs show a collector of next:
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).
itemgetter(0)
Given the common use of "return the first result of the output methods", perhaps this could be added to automat/__init__.py:
automat/__init__.py
from operator import itemgetter first = itemgetter(0)
...and then, obviously, add it to __all__?
__all__
For the docs, perhaps Sybil could be used to test these examples to ensure they are functional and correct?
Thanks @cjw296 ! Want to make a pR?
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
:...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?