[issue28765] _sre.compile(): be more strict on types of indexgroup and groupindex

STINNER Victor report at bugs.python.org
Wed Nov 23 08:15:46 EST 2016


STINNER Victor added the comment:

> It is too. But I meant the code parameter.

Oh ok. It seems like we use PyList_xxx() functions, so yeah, it seems safer (to respect the Python semantics) to only accept exactly the list type.


> Updated patch restricts _sre.compile() to accepting only exact collection types. I don't like this patch.

Why not? Do you prefer to accept subtypes?

sre-concrete-2.patch LGTM, I just added a minor comment.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28765>
_______________________________________


More information about the Python-bugs-list mailing list