[issue40016] Clarify flag case in `re` module docstring

2020-03-25 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
assignee: docs@python -> terry.reedy
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40016] Clarify flag case in `re` module docstring

2020-03-25 Thread miss-islington


miss-islington  added the comment:


New changeset 0dad7486e7d7bc2e0f1b0a4f44d9c28064762be5 by Miss Islington (bot) 
in branch '3.7':
bpo-40016: re docstring: Clarify relationship of inline and argument flags 
(GH-19078)
https://github.com/python/cpython/commit/0dad7486e7d7bc2e0f1b0a4f44d9c28064762be5


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40016] Clarify flag case in `re` module docstring

2020-03-25 Thread miss-islington


miss-islington  added the comment:


New changeset 686d508c26fafb57dfe463c4f55b20013dad1441 by Miss Islington (bot) 
in branch '3.8':
bpo-40016: re docstring: Clarify relationship of inline and argument flags 
(GH-19078)
https://github.com/python/cpython/commit/686d508c26fafb57dfe463c4f55b20013dad1441


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40016] Clarify flag case in `re` module docstring

2020-03-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18522
pull_request: https://github.com/python/cpython/pull/19162

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40016] Clarify flag case in `re` module docstring

2020-03-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 89a2209ae6fc5f39868621799730e16f931eb497 by Ram Rachum in branch 
'master':
bpo-40016: re docstring: Clarify relationship of inline and argument flags 
(#19078)
https://github.com/python/cpython/commit/89a2209ae6fc5f39868621799730e16f931eb497


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40016] Clarify flag case in `re` module docstring

2020-03-25 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +18521
pull_request: https://github.com/python/cpython/pull/19161

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40016] Clarify flag case in `re` module docstring

2020-03-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The docstring is currently 103 lines. I intentionally replaced 1 line with 1 
line that I believe to be more informative and kept the expansion of the other 
line to 3 lines.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40016] Clarify flag case in `re` module docstring

2020-03-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The docstring line in question is
  (?aiLmsux) Set the A, I, L, M, S, U, or X flag for the RE (see below).

This is exceptional in that other syntaxes in the special characters list use 
lower case only for syntax variables (m, n, name, id/name, yes, no).  Here, 
each letter is a separate and literal special character.  (Also exceptional is 
that the syntax given is illegal, as 'a', 'L', and 'u' are mutually exclusive.)

The corresponding doc entry starts
"(One or more letters from the set 'a', 'i', 'L', 'm', 's', 'u', 'x'.)
... the letters set the corresponding flags:" followed by 6 more lines.

I suggest the following as the replacement here (followed by more 'below').
  (?aiLmsux) The letters set the corresponding flags defined below.

I think 'letters' pretty clearly refers to 'a', 'i', ..., and 'x' as given, and 
that each 'corresponds' to and sets a flag that is a separate entity.

The more complicated inline flags syntax, "(?aiLmsux-imsx:...)", is omitted 
from the docstring.  Perhaps this is intentional.

The flag constants are currently introduced by
Some of the functions in this module takes flags as optional parameters:

My suggested more accurate and expanded replacement:
"Each function other than purge and escape can take an optional 'flags'  
argument consisting of one or more of the following module constants, joined by 
"|".  A, L, and U are mutually exclusive."

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40016] Clarify flag case in `re` module docstring

2020-03-21 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
title: Clarify flag case in `re` module -> Clarify flag case in `re` module 
docstring

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com