attrs/changelog.d/383.change.rst

3 lines
201 B
ReStructuredText

``attr.validators.in_()`` now raises a ``ValueError`` with a useful message even if the options are a string and the value is not a string.
This previously raised a ``TypeError``, like ``1 in "abc"``.