INADA Naoki <songofaca...@gmail.com> added the comment:

Instead caching type(flags), how about this?

  if not isinstance(flags, int):
      raise TypeError(f"flags must be int or RegexFlag, got {flags!r}")
  flags = int(flags)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31671>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to