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

Serhiy Storchaka report at bugs.python.org
Wed Nov 23 08:33:40 EST 2016


Serhiy Storchaka added the comment:

I don't like it because it adds a cumbersome code for guarding against a case that doesn't happen in practice. This is just unpythonic. _sre.compile() is a private function and it is called only with exact types. Even if it would called with subtypes, most subtypes don't override __len__ and __getitem__. This restriction is too strong.

----------

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


More information about the Python-bugs-list mailing list