[docs] [issue31369] re.RegexFlag is not included in __all__

Pieter-Jan Briers report at bugs.python.org
Wed Sep 6 18:43:21 EDT 2017

Pieter-Jan Briers added the comment:

I suppose it may be an implementation detail, though I wouldn't be amazed that had enum existed when re was written it'd have been used instead of constant integers at the time. Though I do suppose exposing it fully would add two ways to get the flags which I can see how it would be considered bad.

It's still useful for type checking though, and while I did make a PR to add it to typeshed, that still leaves it in an iffy state and I probably would not be the last person to be confused by it initially.


Python tracker <report at bugs.python.org>

More information about the docs mailing list