diff options
Diffstat (limited to 'babel/util.py')
-rw-r--r-- | babel/util.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/babel/util.py b/babel/util.py index cf86f20..a5403e6 100644 --- a/babel/util.py +++ b/babel/util.py @@ -24,6 +24,7 @@ missing = object() _T = TypeVar("_T") + def distinct(iterable: Iterable[_T]) -> Generator[_T, None, None]: """Yield all items in an iterable collection that are distinct. @@ -43,6 +44,7 @@ def distinct(iterable: Iterable[_T]) -> Generator[_T, None, None]: yield item seen.add(item) + # Regexp to match python magic encoding line PYTHON_MAGIC_COMMENT_re = re.compile( br'[ \t\f]* \# .* coding[=:][ \t]*([-\w.]+)', re.VERBOSE) |