python / cpython

The Python programming language
https://www.python.org/
Other
61.16k stars 29.52k forks source link

No mention of `match.regs` in `re` documentation #62243

Closed 06547701-06a2-4e4a-b672-16a33475101e closed 9 years ago

06547701-06a2-4e4a-b672-16a33475101e commented 11 years ago
BPO 18043
Nosy @birkenfeld, @ezio-melotti, @cool-RR, @phmc

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields: ```python assignee = None closed_at = created_at = labels = ['expert-regex', 'type-bug', 'docs'] title = 'No mention of `match.regs` in `re` documentation' updated_at = user = 'https://github.com/cool-RR' ``` bugs.python.org fields: ```python activity = actor = 'georg.brandl' assignee = 'docs@python' closed = True closed_date = closer = 'georg.brandl' components = ['Documentation', 'Regular Expressions'] creation = creator = 'cool-RR' dependencies = [] files = [] hgrepos = [] issue_num = 18043 keywords = [] message_count = 6.0 messages = ['189859', '228415', '228431', '228432', '228467', '228468'] nosy_count = 7.0 nosy_names = ['georg.brandl', 'ezio.melotti', 'mrabarnett', 'cool-RR', 'docs@python', 'BreamoreBoy', 'pconnell'] pr_nums = [] priority = 'normal' resolution = 'wont fix' stage = None status = 'closed' superseder = None type = 'behavior' url = 'https://bugs.python.org/issue18043' versions = ['Python 2.7'] ```

06547701-06a2-4e4a-b672-16a33475101e commented 11 years ago

There's no mention of match.regs in the documentation of the re module.

83d2e70e-e599-4a04-b820-3814bbdb9bef commented 9 years ago

@Ram Rachum can you provide a patch for this?

birkenfeld commented 9 years ago

I'm wondering what "regs" is supposed to stand for. It might be for "regions", but that term is used nowhere else. It should really be named "spans" to be consistent.

06547701-06a2-4e4a-b672-16a33475101e commented 9 years ago

Mark, I prefer to leave this to someone else.

39d85a87-36ea-41b2-b2bb-2be43abb500e commented 9 years ago

There's an interesting bit of history here:

http://www.gossamer-threads.com/lists/python/dev/236584

birkenfeld commented 9 years ago

IOW: it was already intentionally undocumented back then, and only added for compatibility reasons.

Probably should be deprecated and removed at some point.