Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
include current notification level in cache key
this prevents a cached regular expression being used that was created with a different notification level. For example, the following now generates the expected warning: In [1]: import re2 In [2]: re2.compile('a*+') Out[2]: re.compile('a*+') In [3]: re2.set_fallback_notification(re2.FALLBACK_WARNING) In [4]: re2.compile('a*+') <ipython-input-5-041122e221c7>:1: UserWarning: WARNING: Using re module. Reason: bad repetition operator: *+ re2.compile('a*+') Out[4]: re.compile('a*+')
- Loading branch information