-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-47081: Replace "qualifiers" with "quantifiers" in the re module documentation #32028
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
bpo-47081: Replace "qualifiers" with "quantifiers" in the re module documentation #32028
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@serhiy-storchaka Thanks 👍
@@ -230,13 +230,13 @@ while ``+`` requires at least *one* occurrence. To use a similar example, | |||
``ca+t`` will match ``'cat'`` (1 ``'a'``), ``'caaat'`` (3 ``'a'``\ s), but won't | |||
match ``'ct'``. | |||
|
|||
There are two more repeating qualifiers. The question mark character, ``?``, | |||
There are two more repeating operators or quantifiers. The question mark character, ``?``, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap at 80 chars.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that in this case it is better to keep a line slightly longer that 80 characters than split it on two very short lines or reformat the whole paragraph. PEP 8 allows some liberty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrongly assumed that in Python docs (as we do in Django docs) re-wrapping is stricter. TIL. Thanks 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small compromises are possible. If it would be a new text, it would be stricter.
@@ -87,7 +87,7 @@ Some characters, like ``'|'`` or ``'('``, are special. Special | |||
characters either stand for classes of ordinary characters, or affect | |||
how the regular expressions around them are interpreted. | |||
|
|||
Repetition qualifiers (``*``, ``+``, ``?``, ``{m,n}``, etc) cannot be | |||
Repetition operators or quantifiers (``*``, ``+``, ``?``, ``{m,n}``, etc) cannot be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap at 80 chars.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not PEP 8, but some other PEP for documentation. In any case a common sense is the main principle.
@@ -146,10 +146,10 @@ The special characters are: | |||
single: ??; in regular expressions | |||
|
|||
``*?``, ``+?``, ``??`` | |||
The ``'*'``, ``'+'``, and ``'?'`` qualifiers are all :dfn:`greedy`; they match | |||
The ``'*'``, ``'+'``, and ``'?'`` quantifiers are all :dfn:`greedy`; they match |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap at 80 chars.
https://bugs.python.org/issue47081