diff options
author | orivej <[email protected]> | 2022-02-10 16:45:01 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:45:01 +0300 |
commit | 2d37894b1b037cf24231090eda8589bbb44fb6fc (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /library/python/runtime_py3/__res.pyx | |
parent | 718c552901d703c502ccbefdfc3c9028d608b947 (diff) |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/python/runtime_py3/__res.pyx')
-rw-r--r-- | library/python/runtime_py3/__res.pyx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/library/python/runtime_py3/__res.pyx b/library/python/runtime_py3/__res.pyx index c0e17b7de8f..97190d9f293 100644 --- a/library/python/runtime_py3/__res.pyx +++ b/library/python/runtime_py3/__res.pyx @@ -1,5 +1,5 @@ -from _codecs import utf_8_decode, utf_8_encode - +from _codecs import utf_8_decode, utf_8_encode + from libcpp cimport bool from util.generic.string cimport TString, TStringBuf @@ -24,13 +24,13 @@ def key_by_index(idx): def find(s): cdef TString res - if isinstance(s, str): - s = utf_8_encode(s)[0] - + if isinstance(s, str): + s = utf_8_encode(s)[0] + if FindExact(TStringBuf(s, len(s)), &res): return res.c_str()[:res.length()] return None - - -include "importer.pxi" + + +include "importer.pxi" |