[issue28765] _sre.compile(): be more strict on types of indexgroup and groupindex
Serhiy Storchaka
report at bugs.python.org
Mon Nov 21 11:35:56 EST 2016
Serhiy Storchaka added the comment:
If make groupindex and indexgroup a dict and a tuple, we could use concrete dict and tuple API instead of generic mapping and sequence APIs.
Note that groups, groupindex and indexgroup are not independent. Actually indexgroup is derived from groups and groupindex (in Python code), but groups and groupindex could be derived from indexgroup. groups could be derived from code. The interface of _sre.compile() can be simplified by passing only groupindex or indexgroup. Current interface is only for backward compatibility. I don't know whether this still is needed.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28765>
_______________________________________
More information about the Python-bugs-list
mailing list