From 424e14382cd55502fc0edf3e66ddba0c27b4e594 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Mon, 9 Sep 2019 11:59:15 +0200 Subject: [PATCH] Explain re_matches' default better --- src/attr/validators.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/attr/validators.py b/src/attr/validators.py index 722899b8..3e1e0d04 100644 --- a/src/attr/validators.py +++ b/src/attr/validators.py @@ -104,8 +104,9 @@ def matches_re(regex, flags=0, func=None): (default 0) :param callable func: which underlying :mod:`re` function to call (options are :func:`re.fullmatch`, :func:`re.search`, :func:`re.match`, default - :func:`re.fullmatch`). They won't be used directly but on a - pre-:func:`re.compile`\ ed pattern. + is ``None`` which means either :func:`re.fullmatch` or an emulation of + it on Python 2). For performance reasons, they won't be used directly + but on a pre-:func:`re.compile`\ ed pattern. .. versionadded:: 19.2.0 """