[issue39165] Completeness and symmetry in RE, avoid `findall(...)[0]`

Juancarlo Añez report at bugs.python.org
Wed Jan 1 07:43:20 EST 2020


Juancarlo Añez <apalala at gmail.com> added the comment:

The discussion on python-ideas favored the inclusion of `findfirst()`. At any rate, not having a generator version of `findall()` is an important omission.

Another user's search of Github public repositories found that `findall(...)[0]` is prevalent. python-ideas agreed that the cause was the incompleteness/asymmetry in `re`.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39165>
_______________________________________


More information about the Python-bugs-list mailing list